NASA-AMMOS / NASA-AMMOS/plandev
Make all Hasura action endpoints conform to their expected GQL interface
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 128
- Forks
- 33
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Description
Currently Hasrua action endpoints in merlin-server, scheduler-server, and sequencing-server assume they accept and return data in the form given by the Hasura actions.graphql definitions. This ticket is to do a pass over these services to make sure the endpoints input/output conform to their GraphQL interfaces.
This includes:
- Verifying that all Hasura action endpoints abide by the expected GQL interface.
- Verifying that any changed response serializations do not cause existing Postgres serializations to be changed.
- Writing unit tests for all Hasura action endpoints to assert that their response type matches the type defined in GQL.
Can we automate this so we do not ever need a ticket like this again?
- Can we use a tool like graphql-java-codegen to generate Java types from our actions GraphQL interfaces so the endpoints automatically conform to the interface?
- We can do a similar thing with TypeScript using graphql-codegen/typescript.
See the original internal ticket here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with deployment/hasura/metadata/actions.graphql and compare its action interfaces with the endpoints in merlin-server, scheduler-server, and sequencing-server. Review the request and response serializations, then add unit tests for each action and verify that any response changes do not alter existing Postgres serializations. Done means all action endpoints match their GraphQL types and are covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, java
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100