tapioca icon indicating copy to clipboard operation
tapioca copied to clipboard

Compiler for `GraphQL::Schema`

Open amomchilov opened this issue 1 year ago • 1 comments

Motivation

Which creates a strongly-typed sig for #context, if the context class was customized via the context_class DSL.

For Shopify employees, please see the timeline for a link to a PR with a sample application of this compiler.

Implementation

I copied the GraphQLMutation compiler and edited it.

Tests

I copied the tests for the GraphQLMutation compiler and edited those, too. :)

amomchilov avatar Dec 15 '23 20:12 amomchilov

You set the context class on the Schema, but you don't actually ever read it from the Schema 🤦

I'll rework this to add sigs to the correct classes, like GraphQL::Schema::Resolver, GraphQL::Schema::Mutation, etc.

amomchilov avatar Dec 15 '23 21:12 amomchilov