|
Re: Sirius Web - how to get document IDs with GraphQL [message #1860172 is a reply to message #1860148] |
Thu, 20 July 2023 15:42 |
|
Hi.
I don't think there is a GraphQL API for that.
The Sirius Web Sample Application's GraphQL Schema (https://github.com/eclipse-sirius/sirius-components/blob/master/packages/sirius-web/backend/sirius-web-graphql/src/main/resources/schema/siriusweb.graphqls) only exposes the API/end-points strictly needed by the application itself, and in that context listing documents (which is a notion specific to the sample application, and not part of the core framework) is never needed (they are only exposed as the root nodes in the Explorer view).
This is a design choice. Instead of trying to expose a generic GraphQL schema that would try to be "complete" for arbritrary manipulations of the various concepts, we only expose what it actually needed by the application.
On the other hand, the way this is implemented makes it easy for applications that have different needs to extend the GraphQL Schema with new concepts, queries or mutations.
If a different application needs this capability, it can add them by providing an additional '.graphqls' file which defines the new query and implementing the corresponding data fetcher in the backend (there are many example data fetchers to take inspiration from).
Regards,
Pierre-Charles
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.56340 seconds