Coder Social home page Coder Social logo

Comments (5)

micimize avatar micimize commented on June 2, 2024

No, we can probably put HeroForEpisodeDroidInlineFragment onDroid fields on selection sets and let them handle themselves. I must have been doing this before 1.0

from graphql-to-dart.

micimize avatar micimize commented on June 2, 2024

Ok, I believe I've solved this on 1.2.0-beta. Also added some config options:

  /**
   * Field to base union / inline fragment resolution on. Field will be `@protected`
   * @default '__typename'
   *
   * Can be set to `false` to disable automatic addition of meta fields
   */
  typenameField?: false | string;

  /**
   * { prefix, suffix } to wrap inline fragment type names with
   *
   * @example '{ prefix: "on", suffix: "" } => SomeTypeInlineFragment onSomeType'
   * @default '{ prefix: "", suffix: "InlineFragment" }'
   */
  inlineFragmentFieldNames?: { prefix?: string; suffix?: string };

from graphql-to-dart.

micimize avatar micimize commented on June 2, 2024

@ryankauk let me know if you encounter any more issues

from graphql-to-dart.

ryankauk avatar ryankauk commented on June 2, 2024

@micimize alright thanks!

from graphql-to-dart.

ryankauk avatar ryankauk commented on June 2, 2024

@micimize fragments don't seem to work in my environment. Fragment doesn't exist when used by document outside of my _fragment.gql even though i split the globs. my best guess is that @graphql-codegen/cli probably changed the way they load documents globs, however you can easily just for loop over all the fragments before the handlebars gets ran.

I can refactor but can you explain what scenario the 'hackFragmentFields "ensure_unique"' prevents so I refactor properly?

from graphql-to-dart.

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.