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

Add the specifiedBy type system directive #1193

Merged
merged 7 commits into from
May 13, 2023

Conversation

maartenvanvliet
Copy link
Contributor

Adds the specifiedBy type system directive to Absinthe. See the spec https://spec.graphql.org/October2021/#sec--specifiedBy for its definition.

Also encountered an issue with directive names not being transformed through the adapter in introspection.

Fixes #918

Copy link
Contributor

@benwilson512 benwilson512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

field :name,
type: non_null(:string),
resolve: fn _, %{adapter: adapter, source: source} ->
{:ok, adapter.to_external_name(source.name, :field)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@benwilson512 benwilson512 merged commit d25f16d into absinthe-graphql:master May 13, 2023
@maartenvanvliet maartenvanvliet deleted the issues/918 branch May 14, 2023 06:05
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

Successfully merging this pull request may close these issues.

Support specifiedBy directive
3 participants