Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
subschema composability rules #37
base: main
Are you sure you want to change the base?
subschema composability rules #37
Changes from 13 commits
3855956
10ecf16
20f4345
f3423fd
c3edd84
9995117
97c795a
f5da379
2f99a74
3ee86b5
34e0064
44cd0c5
958becd
0ad6fd3
71c9b2a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Mathematically speaking, isn't it always possible to generate a composite schema from any two schemas A and B that implement the same version of the GraphQL spec and whose root types don't implement any interfaces by renaming every non-standard non-root type and directive in them, prefixing the names of all the fields on the root types with the name of the schema when adding them to the composite schema's root types, and replacing references to the root types in the sub-schemas with the respective composite schema's root types? Sure this becomes A + B rather than A & B - i.e. each field is resolved by exactly one subschema - but that's not really at odds with this paragraph?
I think the wording here needs to be more crisp... not sure how exactly - perhaps refer to the overlapping elements somehow?
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.
The term "GraphQL" implies it's spec compliant. If they're not spec compliant then they're not GraphQL.
Also do you mean "result" rather than "request" here?
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.
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.
Under what circumstances would it be something that we'd do and yet it wouldnot be possible to reverse?
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.
If you accept my
Hybrid
suggestion above, this will need adjusting.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.
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.
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.
A risk of this, however, is if you compose them as equivalent but it turns out they have different meanings and they later wish to diverge. For example:
might evolve in one schema (capabilities) to
enum Can { DUCK RUN }
🏃 or in another (canned goods) toenum Can { DUCK BEANS }
🥫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.
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.
Needs a comment on the interfaces the object type implements too.
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.
May need a comment on the interfaces that the interface implements.