gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

Allow GraphQL outside of project scope #40

Open philippguertler opened 5 years ago

philippguertler commented 5 years ago

Gentics Mesh Version, operating system, or hardware.

If you want to use GraphQL, you always have to specify in which project you want to query data. This does not make sense if you want to get data that is not project specific. The following entities are not project specific:

Because of this, you can't actually use GraphQL to query any of the above types if there is no project. This should be made possible.

Solution

Create a new endpoint /api/v1/graphql (and also /api/v1/graphql/browser) which has the same fields as the project specific ones, except those that are project specific. We also have to be careful to remove all nested fields that reach project specific data (e.g. schemas -> nodes)

In the long term it would be better to remove project specific APIs and design the GraphQL API in a way that allows to fetch project specific data from the global endpoint.

philippguertler commented 5 years ago

When this is resolved, the UI should be changed to use the new API. See https://github.com/gentics/mesh-ui/pull/170/files#diff-5d9be2b20d79219c907663468757e419R55