-
Notifications
You must be signed in to change notification settings - Fork 114
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
Document and improve support for binding non-scalars to a specific type #69
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
query GetPokemonSiblings($input: PokemonInput!) { | ||
user(query: {hasPokemon: $input}) { | ||
# this will override the default mapping to internal/testutil.ID: | ||
# @genqlient(bind: "string") | ||
id | ||
# this is normally an enum, but here we make it a (list of) string: | ||
# @genqlient(bind: "[]string") | ||
roles | ||
name | ||
# this is mapped globally to internal/testutil.Pokemon: | ||
pokemon { species level } | ||
# this overrides said mapping: | ||
# @genqlient(bind: "-") | ||
genqlientPokemon: pokemon { species level } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to comment that the
options.Bind
check is to allow a local option to override applying the global option.