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

refactor(graph-gateway): add query selector extractor #557

Closed
wants to merge 1 commit into from

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Jan 24, 2024

These changes are a major refactoring of the client query handler function. The aim is to simplify the logic in the handler at the expense of a few duplicated lines of code (tracing and metrics).

  • Split the query handler function in two: one per subgraph selector, Subgraph ID and Deployment ID.
  • Add a query selector extractor that wraps Axum's Path extractor to customize the rejection errors. The QuerySelector extractor rejections are GraphQL error responses.
  • Set the tracing span selector field within the query selector extractor.

@LNSD LNSD requested a review from Theodus January 24, 2024 11:02
@LNSD LNSD self-assigned this Jan 24, 2024
@LNSD
Copy link
Contributor Author

LNSD commented Jan 25, 2024

I am putting this PR in draft for now.

@LNSD LNSD marked this pull request as draft January 25, 2024 14:15
@LNSD LNSD force-pushed the lnsd/split-query-handler-fn branch from 768151c to 5726311 Compare January 25, 2024 14:21
@LNSD
Copy link
Contributor Author

LNSD commented Jan 26, 2024

Closing this PR in favor of #563 approach

@LNSD LNSD closed this Jan 26, 2024
@LNSD LNSD deleted the lnsd/split-query-handler-fn branch January 30, 2024 09:53
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

Successfully merging this pull request may close these issues.

1 participant