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

use interceptors for GQL response transformation #6

Open
fbielejec opened this issue Dec 11, 2020 · 0 comments
Open

use interceptors for GQL response transformation #6

fbielejec opened this issue Dec 11, 2020 · 0 comments
Projects

Comments

@fbielejec
Copy link
Member

fbielejec commented Dec 11, 2020

Problem

GraphQL endpoints which return maps have to wrap their response to transform keys into camelCase that fits the graphql schema (example)
It would greatly improve readability and simplify the codebase to have a general mechanism that transparently transforms these responses.

Implementation

The pedestal server allows for the use of interceptors.
And example is already used to inject custom context into the resolvers.
This is one possible solution.

Acceptance Criteria

Interceptor / middleware that transforms responses. Current endpoints cleaned of the clj->gql transformations.

Notes

Lacinia can be used separately from the pedestal server, and it is possible to replace the pedestal webserver with ring or yada if assignee deems it necessary.

Future Steps

Argument and response logging middleware/interceptors : #7

@fbielejec fbielejec added this to To do in spread via automation Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
spread
To Do
Development

No branches or pull requests

1 participant