Problem/Motivation
graphql_compose is not compatible with graphql 5.0.0-rc1 because of breaking API changes introduced since beta3:
getSchema()no longer accepts aResolverRegistryInterface $registryparameter.getSchemaDefinition()must now return aGraphQL\Language\Sourceobject instead of a plain string.getBaseDefinition()andgetExtensionDefinition()inResolverOnlySchemaExtensionPluginBasenow return?Sourceinstead of?string.AlterSchemaDataEventandAlterSchemaExtensionDataEventnow expect preparsedDocumentNodeobjects instead of raw strings.
Steps to reproduce
- Require
drupal/graphqlat5.0.0-rc1. - Enable
graphql_compose. - Load any GraphQL schema and see PHP fatal errors.
Proposed resolution
Apply the attached patch.
Remaining tasks
- Review and test against graphql 5.0.0-rc1.
- Merge once approved.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| graphql_compose-graphql5-rc1-api-compatibility.patch | 4.47 KB | camvertiz |
Issue fork graphql_compose-3590358
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
camvertiz commentedComment #5
almunningsOOOOkkkkay, deprecations on `callback()` all replaced with some slop. Created new producers for everything.
Whilst fixing up producers, View's `label` prop now resolves to the View display title instead of the entity title.
Per #3539592: Add View title to GraphQL Compose query results it's now `title` not `label` in Views GraphQL results.
Tests all pass D10/D11, with the exception of one smart date test next minor, which seems unrelated and more of an upstream issue.
Seems like its good to go (until the next breaking changes)
Can you please run a quick sanity test on this, and we'll get the alpha cut.
Comment #6
camvertiz commentedTested the MR branch on a D11 site running
drupal/graphql 5.0.0-rc1. All GraphQL queries working as expected, no regressions found. The compatibility issue is resolved. LGTM, ready for the alpha cut.Thank you for taking the time to work through this and get it sorted!
Comment #7
almunningsComment #9
almunningsThanks for testing!
I’ll have some time tomorrow afternoon to do the release and double triple check the extra producers.
Comment #10
almunningsAlpha 3 released, thank you