Skip to content

fix(apollo-graphql): support complex directive args#2335

Merged
trevor-scheer merged 1 commit intoapollographql:masterfrom
lennyburdette:transform-schema-directive-object-args
May 24, 2021
Merged

fix(apollo-graphql): support complex directive args#2335
trevor-scheer merged 1 commit intoapollographql:masterfrom
lennyburdette:transform-schema-directive-object-args

Conversation

@lennyburdette
Copy link
Copy Markdown
Contributor

@lennyburdette lennyburdette commented May 24, 2021

This change fixes transformSchema, which previously left directives as-in after transforming types. This meant that Input types used in directive arguments would appear duplicated in the schema. It now recreates schema directives and their arguments like it does with named schema types.

Fixes #2162

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

Comment thread packages/apollo-graphql/src/schema/__tests__/transformSchema.test.ts Outdated
This change fixes `transformSchema`, which previously left directives as-in after transforming types. This meant that Input types used in directive arguments would appear duplicated in the schema. It now recreates schema directives and their arguments like it does with named schema types.

Fixes apollographql#2162
@lennyburdette lennyburdette force-pushed the transform-schema-directive-object-args branch from 631d0b8 to 05f1017 Compare May 24, 2021 23:13
@trevor-scheer trevor-scheer merged commit 7753ddc into apollographql:master May 24, 2021
@lennyburdette lennyburdette deleted the transform-schema-directive-object-args branch May 24, 2021 23:42
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.

Schema composition with directives that use complex argument types

2 participants