fix: support custom directive definitions in schema codegen (option 2, generating)#4093
Draft
magicmark wants to merge 1 commit intostrawberry-graphql:mainfrom
Draft
fix: support custom directive definitions in schema codegen (option 2, generating)#4093magicmark wants to merge 1 commit intostrawberry-graphql:mainfrom
magicmark wants to merge 1 commit intostrawberry-graphql:mainfrom
Conversation
Contributor
Reviewer's GuideAdds support for generating Python stub classes for custom GraphQL directive definitions in schema codegen, updates tests and release notes, and improves the error message when encountering unknown definition types during code generation. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4093 +/- ##
==========================================
+ Coverage 94.22% 94.24% +0.01%
==========================================
Files 541 542 +1
Lines 35519 35563 +44
Branches 1877 1882 +5
==========================================
+ Hits 33469 33515 +46
+ Misses 1739 1737 -2
Partials 311 311 🚀 New features to boost your workflow:
|
f58816e to
b7024c9
Compare
b7024c9 to
b31db07
Compare
Previously, schemas containing custom directive definitions would fail with `NotImplementedError: Unknown definition None`. Now directive definitions are generated with stub implementations. Also fixes the error message for unknown definitions to show the actual type name instead of `None`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
b31db07 to
13c94f4
Compare
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.
Previously, schemas containing custom directive definitions would fail with
NotImplementedError: Unknown definition None. Now directive definitions are generated.Also fixes the error message for unknown definitions to show the actual type name instead of
None.Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Generate schema code for custom directive definitions and improve error reporting for unsupported GraphQL definition types.
New Features:
Bug Fixes:
Documentation:
Tests: