Zendro-dev / graphql-server-model-codegen

Command line utility to auto-generate the structure files for a graphql server
MIT License
1 stars 2 forks source link

Create cenzontle-webservice-adapter for distributed data models #98

Open asishallab opened 4 years ago

asishallab commented 4 years ago

Introduction

Basically for every non distributed data model type there will be a corresponding adapter type. Consider the following list of valid values for the storageType in the adapter definition (JSON).

Implement the above cenzontle-webservice-adapter

A bit cleaning up

Teach the code-generators to recognize the above storageTypes for all that are implemented. Remove the no longer needed adapterType.

Support a remote Cenzontle server

Use as a template the non-distributed "cenzontle-web-service", remove all support for read operations that are based on limit-offset pagination. Add the "adapter overhead", which is recognizeIri and the respective regular expression. Do not send excludeAdapterNames, because the remote Cenzontle server is a "slave" and does not query other servers in the distributed network.

Observations

In order to introduce the above cenzontle-webservice-adapter adapter the template for the DDM-adapter can be reused, only the generated DDM module needs to differentiate. A DDM-adapter is sent a search argument including excludeAdpaterNames while the cenzontle-webservice-adapter is not sent excludeAdpaterNames. This is because the cenzontle-webservice-adapter connects to a Cenzontle slave server that is not aware of the network of servers it lives in and thus its GraphQL schema does not support the excludeAdpaterNames argument.

Documentation

Update the manual and documentation. Please do not forget this point.

framirez07 commented 4 years ago

Completed on commit: i98 - new storageTypes added & adapterType removed from JSON definiti…