Code Monkey home page Code Monkey logo

Comments (1)

th3coop avatar th3coop commented on June 2, 2024

Some notes from the digging I did last night:

It looks like the issue is that when extracting the Interface data from the Introspection data, possibleTypes is used to see ultimately, what fragments it can have. Child interfaces are not included in that list:
https://github.com/dillonkearns/elm-graphql/blob/master/generator/src/Graphql/Generator/Group.elm#L46

To include the child Interface, it looks like you (the royal you (is that a thing?)) need to look at ALL the available Interfaces and see if their "interfaces": [], field is populated, and if it is, update any Interfaces listed with the current Interface name as a "possibleType" so it makes it into the Fragments type of the parent Interface.

Another option could be to not look at the possibleTypes field at all and only look at the interfaces field for every type then update the Interfaces possibleTypes. I could imagine a performance hit with this option though with really big and complex schemas though how much of one, I have not the slightest clue.

from elm-graphql.

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.