-
Notifications
You must be signed in to change notification settings - Fork 527
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
Render SDL #736
Render SDL #736
Conversation
|
Dude, this is awesome. 😍 |
|
@binaryseed I think you're unblocked by the directive args issue now. 🎉 |
I don't think it's quite there, I pushed a commit with Looks like some of the functions in |
That said, this test was even passing before, and I'm seeing the deprecation attached as I expect: %Absinthe.Type.Field{
__private__: [],
__reference__: %{
location: %{
file: "/Users/bruce/code/absinthe-graphql/absinthe/test/absinthe/schema/notation/experimental/import_sdl_test.exs",
line: 23
},
module: Absinthe.Schema.Notation.Experimental.ImportSdlTest.Definition
},
args: %{},
complexity: nil,
config: nil,
default_value: nil,
definition: Absinthe.Schema.Notation.Experimental.ImportSdlTest.Definition,
deprecation: %Absinthe.Type.Deprecation{reason: "Reason"},
description: nil,
identifier: :deprecated_field_with_reason,
middleware: [{Absinthe.Middleware.MapGet, :deprecated_field_with_reason}],
name: "deprecatedFieldWithReason",
triggers: [],
type: :string
}
..... |
I think the Macro based schemas get raw elixir values for This is easy to see when an Enum is used, since it causes a failure in a schema phase: |
Co-Authored-By: Darren Clark <darrenjoelclark@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to merge when you're ready, I just left a couple comments.
Might just want to pull that comment out to an issue, and it looks like you still have one unfinished checkbox on the PR.
Ready to go! |
This PR adds the ability to render out
Blueprint
structs as GraphQL SDL.If you have a blueprint struct, you may view it's SDL by
inspect
ing it with the:pretty
flag:From the command line, you can invoke a Mix Task generate a
.graphql
file: