Skip to content

Conversation

@thiagorp
Copy link
Contributor

@thiagorp thiagorp commented Jan 11, 2019

This is one of a series of PR's I am doing as small improvements that are suggesting on the code itself.

This constraints the resolving of the operation (or the root of the query) to only objects. Removing the unnecessary check that was done checking if the result of the resolving was indeed an object or not.

I want to implement schema introspection and for that I have been reading the code to understand where and how to add it. To be able to handle the __schema field, it's necessary a resolver that we are sure that is the entrypoint so we can build up the schema downwards from it. This change makes it possible.

@thiagorp thiagorp changed the title Improve operation interpreting type safety Improve type safety on operation interpreting Jan 11, 2019
Copy link
Collaborator

@teh teh left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! I especially like the addition of OperationResolverConstraint.

@teh teh merged commit 3224d20 into haskell-graphql:master Jan 29, 2019
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.

2 participants