Motivation
Open Social is slowly moving towards an API first approach.
This issue serves as a meta issue for community discussion and to track to work that will be required to build the new APIs as well as what can be done in the existing themes to utilise the new API structure.
Background reading
The Open Social blog contains articles about our plans and ideas.
A change is coming: decoupled Open Social
Open Social's Alexander Presents Some Lessons Learned at Decoupled Days 2020
Open Social Is Evolving: The First Phase of Fully Decoupling
Proposed resolution
Open Social has selected version 4 of the GraphQL module as it allows us to precisely control the shape of the Graph that we want to present. This allows us to better decouple a clear data graph from the internal data representation.
Remaining tasks
- Identify the data within Open Social that must be exposed
- Design the Graph structure for each piece of data
- Implement pieces of the Graph in their respective stories
Third party usage
MVP requirements and shared code
- #3191632: [GraphQL] Current cursor support is not robust enough
- #3191622: [GraphQL] Implement cache metadata for ConnectionQueryHelperInterface
- #3191613: [GraphQL] Implement formatted text processing
- #3191615: [GraphQL] Implement DateTime formatting in Graph
- #3191642: [GraphQL] Implement file and video support on the Media type
- #3191640: [GraphQL] Allow clients to load images in specific dimensions
- #3191637: [GraphQL] Allow users to be sorted by profile data
- #3191617: [GraphQL] Make media_bridge data producer handle multi value fields
- #3191638: [PP-1] [GraphQL] EntityConnections with aggregate query need a sort by id fallback
- #3191621: [GraphQL] Violation should be a type rather than a scalar
- #3195082: [GraphQL] Use dependency injection for entity buffer in Query Helpers
Identified parts of the Graph
- #3174544: [GraphQL] Implement base GraphQL module
- #3174547: [GraphQL] Implement basic user and profile querying in the Graph
- #3185497: [GraphQL] Implement basic event querying in the Graph
- #3185523: [GraphQL] Implement basic topic querying in the Graph
- #3185525: [GraphQL] Implement basic group querying in the Graph
- #3186210: [GraphQL] Implement basic posts querying in the Graph
Bits of previously defined schema may be salvaged from https://github.com/goalgorilla/open_social/pull/2196
User interface changes
Existing user interfaces should not change as a result of work done for the GraphQL API.
API changes
Many API additions will be made in the form of a GraphQL API.
Data model changes
Internal data structures may change to accommodate the GraphQL API resolvers, keeping semantic versioning in mind.
Comments
Comment #2
kingdutchComment #3
ronaldtebrake commentedComment #4
ronaldtebrake commentedComment #5
ronaldtebrake commentedComment #6
ronaldtebrake commentedComment #7
ronaldtebrake commentedComment #8
ronaldtebrake commentedComment #9
kingdutchComment #10
kingdutchWe previously introduced parts of the schema that we didn't yet need or implement resolvers for. We've removed these in https://github.com/goalgorilla/open_social/pull/2196 but they may still be useful if you implement certain features in the future.
Specifically
Comment #11
kingdutch