-
Notifications
You must be signed in to change notification settings - Fork 61
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
GraphQL 4: Upgrade core modules #282
Comments
Asset-admin is green: https://travis-ci.org/github/unclecheese/silverstripe-asset-admin/builds/736198735 |
@unclecheese Can you please ensure that there's builds for both 3.x and 4.x variations? Technically doesn't require all tests to run, but specifically the Behat tests on CMS, Elemental and AssetAdmin would be useful to test across both, right? |
EDIT: have addressed this in the original issue. |
We have a new PR that should go into the next minor release of GraphQL / recipe-cms: #310. This PR adds a new API that allows customisation of the field name formatting (e.g. casing), and allows the global use of The reason for this is that in doing the upgrades, it became clear that the easiest path for backward compatibility was to make the GraphQL 3 queries look like they will in GraphQL 4, rather than try to maintain two versions of the same query (which often wasn't an option due to assignment at build time). Since changing the admin GraphQL schema is not an API change, these changes will be suitable for a minor release. All the above modules have had the BC strategy implemented, tests backported, and backward compatibility tests added to the Travis matrix. Most of them are still showing failures that I'm still working through. |
I think we should mark all the legacy PHP classes (e.g. |
All the core modules, except for graphql itself, are passing with backward compatibility. This card is ready for review. |
Are you still working on frameworktest? If its more than a day of work, we could make a new major release line for GraphQL v4 compat there? A bit of double maintenance going forward on the two release lines, but there's really no semver commitments on that module. |
Sorry, frameworktest was merged a while ago. silverstripe/silverstripe-frameworktest@0302087 |
Do you think we should mark all PHP classes in the |
Yeah, probably a good idea. I'd also like to figure out a way to hide all the generated code from the IDE, as well. (Try searching for Page when you have four schemas) |
I've written up a 4.8.0 changelog entry to avoid confusion for early user of recipe 4.x-dev: silverstripe/silverstripe-framework#9762. We can flesh this out with a proper GraphQL v4 pre-release announcement (coinciding with |
I see you've used
|
No, just haven't cleaned it up yet. They were all classmap at one point and then got migrated to the array syntax. Unfortunately, it seems like even the array syntax won't hold up in Composer 2. It's complaining in either configuration. |
All merged, there's a few follow up issues emerging from this though: silverstripe/silverstripe-versioned-snapshots#40 |
To implement
To merge
Backward compatibility
These upgrades were done without attention to backward compatibility. This shouldn't have happened. The groundwork for BC had been established (graphql-legacy.yml, and writing
data-graphql-legacy
to the document for runtime client side compat). We'll need to revisit the upgrades for asset-admin and elemental.Assuming changing the admin graphql schema in GraphQL 3 is not an API change, this should be pretty straightforward.
Tasks:
Setup
See
.travis.yml
files for new required forks.Build status (with backward compat)
✅ silverstripe/admin https://travis-ci.com/github/silverstripe/silverstripe-admin
✅ silverstripe/asset-admin https://travis-ci.org/github/unclecheese/silverstripe-asset-admin/builds/741754720
✅ silverstripe/cms https://travis-ci.org/github/unclecheese/silverstripe-cms
✅ silverstripe/versioned https://travis-ci.org/github/unclecheese/silverstripe-versioned/builds/741841567
✅ silverstripe/versioned-admin https://travis-ci.com/github/unclecheese/silverstripe-versioned-admin/jobs/429439571 (behat)
✅ dnadesign/silverstripe-elemental https://travis-ci.org/github/dnadesign/silverstripe-elemental/builds/741743836
The text was updated successfully, but these errors were encountered: