Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GraphQL endpoint #109

Open
Michiel-s opened this issue Feb 25, 2023 · 0 comments
Open

Add support for GraphQL endpoint #109

Michiel-s opened this issue Feb 25, 2023 · 0 comments

Comments

@Michiel-s
Copy link
Member

Context

Currently the way to get data from the backend is by calling the API according to the Ampersand INTERFACE specifications for your prototype application. The interfaces determine the exact data is is returned, nothing more, nothing less. The interface definitions also determine the keys for all returned json objects. The labels in the interface are used for that. No knowledge of the internal conceptual model (concepts and relations) is required nor available.

Feature request

GraphQL is a protocol for frontend-backend integration by means of a more flexible API. The consumer of the API can determine the data he requires and customize keys and structure if needed.

This issue requests to add GraphQL support in the backend implementation to allow for customized use in frontend applications.

Things to take into account

Access control Currently the access control is specified by means of INTERFACE - ROLE assignments and the crud specifications in the interfaces. For the GraphQL endpoint we need to add additional access control specifications. One idea is to use the proposal in AmpersandTarski/Ampersand#1375 with the RESTRICT statement for relations.

Internal binding to SQL queries Major challenge is the binding of the GraphQL queries to the SQL database structure. I'm not sure yet if we need to reuse and/or generate new sets of SQL queries for this ór that this is not needed at all because of some GraphQL-Mysql library we could reuse. This needs further investigation

...

Positioning in architecture

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant