feat: Add schema coordinates support (RFC #794)#1407
Open
jwaldrip wants to merge 2 commits intoabsinthe-graphql:mainfrom
Open
feat: Add schema coordinates support (RFC #794)#1407jwaldrip wants to merge 2 commits intoabsinthe-graphql:mainfrom
jwaldrip wants to merge 2 commits intoabsinthe-graphql:mainfrom
Conversation
cschiewek
reviewed
Jan 13, 2026
cschiewek
reviewed
Jan 13, 2026
Implement schema coordinates as defined in the GraphQL specification. Schema coordinates provide a standardized, human-readable format for referencing elements within a GraphQL schema. This implementation provides: - Coordinate generation for all schema element types - Coordinate parsing with validation - Coordinate resolution against a schema - Error helper utilities for including coordinates in messages Note: This does NOT modify the introspection schema. Schema coordinates are a string format utility, not an introspection extension. Coordinate formats: - Type: "User" - Field: "User.email" - Argument: "Query.user(id:)" - Enum Value: "Status.ACTIVE" - Directive: "@deprecated" - Directive Argument: "@deprecated(reason:)" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
81ba7e1 to
71f503f
Compare
- Move :directive atom clauses before generic clauses in coordinate_for/2 and coordinate_for/3 to prevent shadowing by pattern match order - Escape string interpolation in @moduledoc to prevent compile-time eval - Fix coordinate resolution tests to use "RootQueryType" (Absinthe's default query type name) instead of "Query" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
@jwaldrip if you address the CI failures, I'll get this merged. |
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.
Summary
Implement schema coordinates as defined in the GraphQL specification (RFC #794). Schema coordinates provide a standardized, human-readable format for referencing elements within a GraphQL schema.
Changes
Add
Absinthe.Schema.Coordinatemodule with parsing, generation, and resolution:UserUser.emailQuery.user(id:)@deprecated@deprecated(reason:)Status.ACTIVECreateUserInput.nameAdd coordinate introspection support to all introspection types:
__Type.coordinate(returns null for wrapped types)__Field.coordinate__InputValue.coordinate(for args and input fields)__EnumValue.coordinate__Directive.coordinateAdd helper functions to
Phase.Errorfor attaching schema coordinates to errorsTest plan
🤖 Generated with Claude Code