Repository navigation
Conversation
…, fields, params and input fields Threads an optional description= kwarg through the graph-side schema builders (ObjectType, InterfaceType, InputObjectType, field, param, input_field) and propagates it into the generated GraphQLObjectType / GraphQLInterfaceType / GraphQLInputObjectType / GraphQLField / GraphQLArgument / GraphQLInputField, so descriptions show up in introspection and GraphiQL. Bump version to 0.5.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The updated GraphQL schema generation still omits default_value for arguments/input fields, dropping defaults from the generated schema despite existing has_default handling.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds first-class description= support across GraphLayer schema definitions and ensures those descriptions propagate into the generated graphql-core schema objects so they appear in introspection/GraphiQL.
Changes:
- Adds optional
descriptionto schema building blocks (ObjectType,InterfaceType,InputObjectType,field,param,input_field). - Propagates descriptions into generated
GraphQL*types/fields/arguments/input-fields. - Adds tests for description propagation and bumps package version to
0.5.0.
| File | Description |
|---|---|
graphlayer/schema.py |
Introduces description fields on schema objects (types/fields/params/input-fields). |
graphlayer/graphql/schema.py |
Passes description into generated graphql-core schema objects. |
tests/graphql/test_schema.py |
Adds coverage asserting description propagation into GraphQL schema objects and updates matchers accordingly. |
setup.py |
Updates package version to 0.5.0. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
alexhermida
approved these changes
Sep 28, 2026
…in README Addresses review feedback on #6: EnumType was the one named/documented schema type still missing description= support, so it's added here and propagated into the generated GraphQLEnumType. The built-in scalar types (Boolean, Float, Int, String) are left as-is — they map directly onto graphql-core's standard scalar types, which already carry fixed, spec-mandated descriptions, and graphlayer doesn't support defining custom scalar types at all. Documented this reasoning in the new README section alongside a worked example of every type/field that does accept description=. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Author
|
Updated based on review feedback:
276 → 277 tests passing. |
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
description=kwarg toObjectType,InterfaceType,InputObjectType,field(),param(), andinput_field()GraphQLObjectType/GraphQLInterfaceType/GraphQLInputObjectType/GraphQLField/GraphQLArgument/GraphQLInputFieldincreate_graphql_schema, so they surface in introspection and GraphiQLNeeded by the knowledge-base app, which wants to start documenting its GraphQL schema but currently has nowhere to attach a description — graphlayer drops it silently today.
Test plan
pytest tests/— 276 passed (270 existing + 6 new covering description propagation for object/interface/input-object types, fields, params, and input fields)