Code Monkey home page Code Monkey logo

Comments (7)

chkimes avatar chkimes commented on May 19, 2024

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.

fabiodr avatar fabiodr commented on May 19, 2024

Good to know! then it must be somewhere in git history :)

from graphql-net.

fabiodr avatar fabiodr commented on May 19, 2024

Fast one.. thanks!! =)

Just another question: can i use GraphiQl client with this solution?

from graphql-net.

chkimes avatar chkimes commented on May 19, 2024

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.

chkimes avatar chkimes commented on May 19, 2024

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.

fabiodr avatar fabiodr commented on May 19, 2024

Great, thanks for the usage sample.

About GraphiQl, for sure, i'll try this out and let you know.

from graphql-net.

chkimes avatar chkimes commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.