Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Use AstSchemaBuilder from args rather the default one #6

Merged
merged 1 commit into from
Nov 5, 2019

Conversation

Axxiss
Copy link

@Axxiss Axxiss commented Nov 4, 2019

On the current implementation definitions(document, builder) doesn't use the builder argument at all and instead always use AstSchemaBuilder.default. So this PR make use of the custom builder and pass to the AstSchemaMaterializer as an argument.

 // This implementation provides the default AstSchemaBuilder
  def definitions(document: ast.Document): Vector[Named] =
    definitions[Any](document, AstSchemaBuilder.default)

 // Here we accept a custom AstSchemaBuilder as an argument but we don't use it. We use the default one instead
  def definitions[Ctx](document: ast.Document, builder: AstSchemaBuilder[Ctx]): Vector[Named] =
    new AstSchemaMaterializer[Ctx](document, AstSchemaBuilder.default).definitions

Migrated from sangria-graphql#420

@yanns yanns merged commit ab07723 into sangria-graphql-org:master Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants