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

Type System Directives SDL rendering #1010

Merged

Conversation

binaryseed
Copy link
Contributor

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

@@ -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
Copy link
Contributor Author

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__)
Copy link
Contributor Author

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

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

1 participant