Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragments with Babel macro #620

Open
tpict opened this issue Feb 23, 2022 · 0 comments
Open

Fragments with Babel macro #620

tpict opened this issue Feb 23, 2022 · 0 comments

Comments

@tpict
Copy link

tpict commented Feb 23, 2022

I have a few questions–would you consider enabling the "Discussions" GitHub feature for community help? :)

First question is specific to graphql-let. Is it possible to include fragments when using the { gql } from "graphql-let/macro" that themselves are defined using gql? Or are fragments only supported when they're stored in a .graphql file?

Next questions may be graphql-codegen specific, not sure (I'm migrating from Apollo):

Is it possible to customize the name of generated types for queries (not schema types)? They go under something like graphql-let/__generated__/src/MyComponent/index-MyQuery-MyOtherQuery by default, so any imports break if you add additional queries to the file.

Is it possible to export separate generated types for each field in a query? With Apollo codegen for example, if I have a query like

query Something {
  something {
    edges {
      node {
        id
      }
    }
  }
}

then the something, edges, and node fields will each have separate interfaces exported. By default, graphql-let defines a single interface for Something which has the entire structure declared inline.

Thanks! this library is really exciting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant