-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
feat: Allow overriding the executor used to GraphQLInterpreter #1135
Conversation
/** | ||
* Verifies that the given schema is valid. Fails with a [[caliban.CalibanError.ValidationError]] otherwise. | ||
*/ | ||
def validateSchema[R](schema: RootSchemaBuilder[R]): IO[ValidationError, RootSchema[R]] |
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.
I think we can exclude this one if we want to.
While this is OK, I'm curious if you are able to implement what you needed with an |
I think I'll be able to, but haven't been able to test enough due to #1136. Will get back to you that asap tomorrow 😅 |
@ghostdogpr it worked great! I could basically do this def apply[R](
schema: __Schema
): GraphQL[R] = {
val builder = RootSchemaBuilder(
query = Some(Operation[R](schema.queryType, Step.NullStep)),
mutation = schema.mutationType.map(mt => Operation[R](mt, Step.NullStep)),
subscription = None
)
new GraphQL[R] {
protected val additionalDirectives: List[__Directive] = schema.directives
protected val schemaBuilder: caliban.schema.RootSchemaBuilder[R] = builder
protected val wrappers: List[caliban.wrappers.Wrapper[R]] = List()
}
} to get a schema without resolvers and then just wrap that up with an |
No description provided.