GraphQL as a first-class endpoint type#31
Merged
Conversation
A GraphQL API was modelled as a raw POST where the caller hand-writes the
query. Now an endpoint carries a fixed graphql= document and the tool's args
become the GraphQL variables, so a caller invokes a named operation.
- Endpoint.graphql: when set, the handler POSTs {query: <doc>, variables:
{<body args>}}; args appear in the argument schema as the variables.
- Linear (GraphQL-only) converted from one raw linear_graphql tool to named
operations: linear_viewer / linear_my_issues / linear_teams / linear_issue.
Catalog now 111 tools.
248 tests (+4), mypy --strict, ruff (whole repo), catalog freshness all green.
v0.23.0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A GraphQL API was modelled as a raw
POST /graphqlwhere the caller hand-writes the query string as an argument. GraphQL is now a first-class endpoint type.Endpoint.graphqlholds a fixed query document. When set, the handler POSTs{"query": <doc>, "variables": {<body args>}}— a named operation whose tool arguments are the GraphQL variables. The variables appear in the tool's argument schema, so a client (and a model) sees typed inputs, not "paste GraphQL here".linear_graphqltool to named operations:linear_viewer,linear_my_issues,linear_teams, andlinear_issue(which takes anidvariable). Catalog now 111 tools.4 new tests: the query envelope is sent, args map to variables, variables include only provided args, and GraphQL variables show up in the argument schema. 248 tests, mypy --strict, ruff (whole repo), catalog-freshness green. Backward compatible; v0.23.0.