-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
Align SchemaExtenderTest
with graphql-js
#929
Conversation
- Fixes asserts and indentation - Preserves additional tests and changes for repeatable and interfaces implementing interfaces. - Doesn't add these two missing tests as they tests unsupported lagacy names: - it('maintains configuration of the original schema object' - it('adds to the configuration of the original schema object'
Tests no longer present in `graphql-js` has been moved to `SchemaExtenderLegacyTest`. Respective commits that removed them from `extendSchema-test.js` are mentioned in comments. Tests fail because: - `repetable` in directives is lost when calling `extend()` - `Schema::getAstNode()` returns `null` for an extended schema - scalar types are added to schema automatically even if they are not used in SDL
Reasons, why tests fail (in addition to those mentioned in the previous commit): - a problem with parsing/printing of types without fields (e.g. `type Query`) - string comments become multiline (e.g. `"""Comment"""` becomes `"""\nComment\n"""` - different order of definitions affects `printSchemaChanges()` - missing `@` in directive name in error messages
Awesome work so far. What is your plan for integrating those changes? |
I'm not quite sure yet. I want to have a look at |
If small pull requests emerge, that would be great. If not, I am also fine with a large pull request that fixes it all. |
Thank you for this. Apart from #1140, we are now in sync. |
Follow-up to #928. Aligns
SchemaExtenderTest.php
withextendSchema-test.js
(up tographql-js
v15.5.2).v14.7 commit
Tests no longer present in
extendSchema-test.js
have been moved toSchemaExtenderLegacyTest
. These are the corresponding commits ingraphql-js
(relevant also for #928):Tests in this commit fail because:
repeatable
in directives is lost when callingextend()
(fixed in Fixextend()
to preserverepeatable
#931)Schema::getAstNode()
returnsnull
for an extended schemav15.0 commit
Reasons, why tests fail (in addition to those mentioned above):
type Query
) (fixed in Fix printing of empty types #940)"""Comment"""
becomes"""\nComment\n"""
(fixed in UnifyPrinter
andSchemaPrinter
output for block strings #938)printSchemaChanges()
(Printed schema should preserve original order of types #954)@
in directive name in error messages