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

Ballerina client for interacting with the global data API #27

Closed
Tracked by #8
samisa-abeysinghe opened this issue Oct 21, 2022 · 0 comments
Closed
Tracked by #8
Assignees

Comments

@samisa-abeysinghe
Copy link
Collaborator

samisa-abeysinghe commented Oct 21, 2022

Rather than having a central client, we will be using clients from each BFF
This way, the GQL client will only focus on the entities and processing logic related to the domain logic.
This is being done in the admissions applications BFF

The process to generate the GQL client is the following

  1. Query the JSON schema from the GraphQL service
  2. Convert JSON schema to IDL
    • graphql-introspection-json-to-sdl schema.json > schema.graphql
  3. Point to schema IDL file from graphql.config.yaml
  4. Create a file each for queries and mutations you want
  5. Copy queries and mutations to relevant files
  6. Point to those queries and mutations from graphql.config.yaml
  7. Run the bal command
    • bal graphql -i graphql.config.yaml -o gd_client_src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant