Sha256: 512a52aa1946fa83f6f347882f1dc56f40f8763ed5702c0e822659e764bde27f
Contents?: true
Size: 606 Bytes
Versions: 10
Compression:
Stored size: 606 Bytes
Contents
module GraphQL module StaticValidation class MutationRootExists include GraphQL::StaticValidation::Message::MessageHelper def validate(context) return if context.schema.mutation visitor = context.visitor visitor[GraphQL::Language::Nodes::OperationDefinition].enter << ->(ast_node, prev_ast_node) { if ast_node.operation_type == 'mutation' context.errors << message('Schema is not configured for mutations', ast_node, context: context) return GraphQL::Language::Visitor::SKIP end } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems