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

Support directives declared stitched schemas #936

Merged

Conversation

nigel-sampson
Copy link
Contributor

@nigel-sampson nigel-sampson commented Jul 28, 2019

This is the step in adding support for directives declared in a stitched schema to be included in the resulting merged schema. I don't think this is the final bit of work in this area but wanted to create the PR now in order to start some of the discussion.

Directives work a little differently than a lot of the other types so I'm not sure if merging can work in the same way.

Some of the guiding assumptions I made:

  1. Directives type declarations cannot themselves have directives applied to them. This means we cannot use the @source directive to support type name rewriting.
  2. Without type name rewriting it doesn't make sense to try and generate unique names for directives that cannot be merged. This PR throws an exception for this scenario, if another avenue for storing the source directive name emerges then this should be possible.
  3. Given this closed nature of directive merging I haven't tried to add any extension points for custom directive merge handlers.

@michaelstaib
Copy link
Member

I will look at this tonight ...

Copy link
Member

@michaelstaib michaelstaib 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 :)

@michaelstaib michaelstaib merged commit 795e4c0 into ChilliCream:master Jul 30, 2019
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.

2 participants