GraphQL support #7990
Replies: 6 comments 2 replies
-
In general I think GraphQL has a great balance between performance x ergonomics, so I'd definitely start a new project with it. From a maintenance perspective, I don’t think it makes sense for us to keep a REST + a GraphQL API… This way I consider the introduction of GraphQL should incur in the early deprecation of REST. The REST API is somehow recent, so I don’t think it will be missed by many, but at the same time I think we should stick to our choices to avoid having an architecture salad across the branches. Anyway, before making any choice, it will be needed to make some experiments and ensure it fits well. |
Beta Was this translation helpful? Give feedback.
-
Two big questions that need to be answered for me:
|
Beta Was this translation helpful? Give feedback.
-
My thoughts about this are more or less pointed in your initial post Jonas.
May be (as sysops) my perspective is biased, but my main concerns will be related with maintenance and performance issues. It sounds like a "nice to have" feature with a big potential... but IMHO, it won't be in the top the community priority list. |
Beta Was this translation helpful? Give feedback.
-
Looks like GitHub decided to drop some GraphQL APIs in favour of their REST one. I didn't see a reason, but I guess it's too complex to optimize things, while keeping the GraphQL ideals (reusability) intact for a large amount of users 😁 |
Beta Was this translation helpful? Give feedback.
-
A friend spoke highly of PostGraphile, a node-based tool that produces a graphql API from a postgres database. It's not appropriate for our general community (node, postgres), but may provide an easy way for a technical team to get graphql access to OJS/OMP/OPS data, when they want to be able to read data into a third-party tool. |
Beta Was this translation helpful? Give feedback.
-
Hi, Just to drop my 2 cents here as long time graphql user. I am early graphql adopter.. used it on production projects for last 7 years. And I have mostly good things to say about it. More challenging parts for OJS context would be extending schema runtime (teoretically doable.. but simply not usual use case so that would need to be investigated) and any updates (POST, PUTs) are done via graphql mutations which can provide the same level of capability, but are certainly more difficult to consumers to write such queries correctly compared to REST. And than general challenge with graphql is to stay performant even for very creative queries coming from consumers. Overall it probably could do good service.. but of course not solving all our problems :-). Given that we already have decent number of REST endpoints and laravel has much more internal support for creating REST, than graphql. I think sticking with REST is reasonable. If someone would be interested for deeper debate let me know. |
Beta Was this translation helpful? Give feedback.
-
We've considered adding support for GraphQL, so here's a list with pros/cons to help us reason if it's worth, when to introduce it, etc.
Pros
pkp-lib
, which is extended later on).Cons
200
, caching headers, etc.)Notes
Beta Was this translation helpful? Give feedback.
All reactions