Comments (4)
Thanks mate, will close.
from dapper.graphql.
Yep, it avoids the n+1 problem by growing query results horizontally rather than vertically. There's a point where this payoff starts to fade, but for most use cases you'll see a big performance increase.
I haven't used graphql-net's authorization toolset, but based on what I'm seeing browsing through their code, it shouldn't interfere with this library. Essentially, you build _QueryBuilder_s that are used by a single QueryBuilder that's rooted at the top of your schema. Each type resolves the same way it always has, this library just gets really critical about what information it retrieves on each object (preferably getting all data in one or two queries) before resolving.
from dapper.graphql.
I see what you mean, I did even more looking into it yesterday and my understanding is that if you do the following:
Field<ListGraphType<EmailType>>(
"emails",
description: "A list of email addresses for the person.",
resolve: context => context.Source.Emails
);
you're resolver function is just grabbing the value off the already constructed/populated entity, which you're saying is populated by executing the root-level query builder's generated SQL and the subsequent entity mapper.
Does that sound right? If so, then I guess the Authorization library should still play nice as it will intercept the resolver function call (e.g. context => context.Source.Emails
), apply the Authorization logic and approve/deny that field resolution.
Thanks, I think this is exactly what I need. GraphQL is great in principle, but without a really sensible layer to map the query to the data storage system easily, effectively and optimally it's very easy to run into trouble I can imagine.
from dapper.graphql.
@benmccallum Yes, that sounds right.
from dapper.graphql.
Related Issues (20)
- Target a more generic .NET version to keep it version-agnostic (e.g. netstandard1.6) HOT 1
- Pass commandTimeout to Dapper HOT 1
- Get values from cache HOT 1
- Entity mappers that use IHaveSelectionSet or SplitOn types cannot properly deduplicate
- More complex project examples HOT 5
- Cannot automatically map inline fragments from GraphQL
- Add performance tests
- How to implement a Many to Many relationship HOT 1
- dataloader HOT 1
- Add mutation example HOT 2
- Generated SQL does not place a space or line break before FROM and WHERE HOT 5
- Updated GraphQL to the latest (2.3) HOT 5
- Issue to compiling HOT 3
- SqlQueryContext: SplitOn() should call RemoveSingleTableQueryItems() HOT 3
- Taking x number of results? HOT 2
- Operator support via Arguments
- What is point of calling serviceCollection.AddDapperGraphQL? HOT 1
- Question on Updates HOT 2
- graphql-dotnet@next HOT 1
- enclose select columns in brackets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dapper.graphql.