Comments (7)
Hi Fabio,
Well this is embarrassing. I believe at one point we had that overload, but I may have removed it during an overzealous refactoring. I can work on getting it added back in.
from graphql-net.
Good to know! then it must be somewhere in git history :)
from graphql-net.
Fast one.. thanks!! =)
Just another question: can i use GraphiQl client with this solution?
from graphql-net.
This should be available on NuGet now. The usage looks like:
typeBuilder.AddListField("someName", new { argField = 0 },
(db, args, entity) => entity.OtherThings.Where(t => t.Field == args.argField));
Note that the lambda has 3 arguments, first for your context, second for your args, and third for the entity that the field is being referenced from. This is the same for the AddField
overload.
from graphql-net.
I'm not sure about GraphiQL, I haven't played with it yet. It should just use GraphQL introspection to discover what is available in the schema and we have introspection implemented, so in theory it will work. In practice, introspection hasn't been thoroughly exercised so I can't predict how well it will work.
That said, you could give it a try and let me know what happens.
from graphql-net.
Great, thanks for the usage sample.
About GraphiQl, for sure, i'll try this out and let you know.
from graphql-net.
Closing this issue since the new overload is available on NuGet. If something comes up with GraphiQL, let me know in another issue. Thanks!
from graphql-net.
Related Issues (20)
- .Net Core support HOT 1
- Decimal Argument Types
- AddAllFields does not actually add all fields
- Question: Is this library/repo being actively maintained? HOT 6
- GraphQl in .net framework HOT 1
- Convert IQueryable to GraphQL query
- How create the query with pagination option HOT 14
- Query field, resolve or queryableGetter is being executed twice HOT 6
- Exception when using with GraphiQL
- Behavior on exception doesn't match one from spec
- Unsupported CLR with nullable DataTime HOT 4
- The type initializer for 'GraphQL.Net.DynamicTypeBuilder' threw an exception.” HOT 8
- [Feature Request] Schema File HOT 1
- Adding headers to the webclient HOT 1
- Mutations with underlying async calls
- [Feature Request] Support variables
- EF issue - user is a value type and cannot be selected from HOT 8
- System.TypeInitializationException on schema.Complete() HOT 1
- DateTime support in queries? HOT 1
- GraphQLTypeBuilder AddListField with another typeBuilder
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 graphql-net.