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

Fixes Parser & Printer for SDL Functionality #138

Merged

Conversation

NeedleInAJayStack
Copy link
Member

This makes the following minor fixes to the Printer and Parser to support SDL functionality:

  1. Schema extension parser correctly captures operations
  2. Description printing matches reference implementation
  3. Parser correctly errors on empty extend blocks
  4. Parser correctly errors when disallowed descriptions are provided.

@NeedleInAJayStack NeedleInAJayStack self-assigned this Dec 25, 2023
@NeedleInAJayStack NeedleInAJayStack changed the title Updates Parser & Printer for SDL Functionality Fixes Parser & Printer for SDL Functionality Dec 25, 2023
Copy link
Member

@paulofaria paulofaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work. Does this mean we can now print SDL from schemas? I remember I was working on something like this on a very old branch. The one that also had some work related to client and server directives. One of the goals of that branch was also to polish Graphiti's APIs to make them even closer to the SDL. One thing that I really liked was allowing strings on top of type definitions and treating them as block comment descriptions of the types. I should try and cherry pick some of that work and open a PR. There were some interesting stuff there.

@NeedleInAJayStack
Copy link
Member Author

Does this mean we can now print SDL from schemas?

Yes! Well kinda. The last step is just to make it public:

func print(ast: Node) -> String {

I should try and cherry pick some of that work and open a PR

Sounds very cool! I'd love to review it!

@NeedleInAJayStack NeedleInAJayStack merged commit 0fee9b5 into GraphQLSwift:main Dec 26, 2023
7 checks passed
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.

None yet

2 participants