-
Notifications
You must be signed in to change notification settings - Fork 529
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
Type System Directives SDL rendering #1010
Type System Directives SDL rendering #1010
Conversation
@@ -44,7 +44,8 @@ defmodule Absinthe.Phase.Schema.ApplyDeclaration do | |||
%{ | |||
schema_definition | |||
| type_definitions: | |||
Enum.map(schema_definition.type_definitions, &maybe_mark_root(&1, root_mappings)) | |||
Enum.map(schema_definition.type_definitions, &maybe_mark_root(&1, root_mappings)), | |||
schema_declaration: declaration |
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.
Storing the schema_declaration
so it can be used by SDL rendering - it might contain directives that we want to render
@@ -613,7 +613,7 @@ defmodule Absinthe.Schema do | |||
def to_sdl(schema) do | |||
pipeline = | |||
schema | |||
|> Absinthe.Pipeline.for_schema() | |||
|> Absinthe.Pipeline.for_schema(prototype_schema: schema.__absinthe_prototype_schema__) |
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 was needed to get the directive definitions in place when applied with a prototype schema
This PR is part of #1003
This PR ensures that directives applied to types (ie: Type System Directives) are correctly rendered in SDL output
After this, we can add support for these directives actually showing up in the
Absinthe.Type.*
structs