v2 Proposal: GraphQL Schema Adjustments to Align with GraphQL Best Practices #3273
acomagu
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
+1 - would be good for the GraphQL API to be Relay-spec compliant! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've evaluated many Headless CMSs as potential migration targets from Strapi for our product. We're currently leaning towards adopting Payload CMS.
However, I've observed a few peculiarities in Payload CMS's GraphQL implementation that set it apart from other CMSs. These might seem minor, but addressing them can make migrations smoother for many.
These nuances appear to be a reflection of a REST API structure. However, adhering to commonly accepted GraphQL best practices can make the API more intuitive for newcomers and facilitate migrations from other CMSs
For instance, another Headless CMS named Hygraph doesn't exhibit these issues. Given that it was designed with a GraphQL-first approach, it can be a useful reference for design.
Additionally, there's OpenCRUD, which aims to establish a standard for GraphQL APIs across all Headless CMSs. Several CMSs have already aligned with it, making it a valuable reference for API design.
With this in mind, here are my proposed design modifications:
Query.<Collection Name>Connection
field (an idea from OpenCRUD).For clarity, here's a representation of what it might look like:
I understand there might be concerns about migrating from the current Payload setup, but I think it's also important to make transitions from other CMSs seamless, as well as provide an API without surprises for those experienced with GraphQL.
Thank you for your consideration.
Beta Was this translation helpful? Give feedback.
All reactions