Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions src/test/groovy/graphql/ParseAndValidateTest.groovy
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
package graphql

import graphql.language.Document
import graphql.parser.InvalidSyntaxException
import graphql.parser.Parser
import graphql.schema.GraphQLSchema
import graphql.schema.idl.SchemaParser
import graphql.schema.idl.TypeDefinitionRegistry
import graphql.schema.idl.UnExecutableSchemaGenerator
import graphql.validation.ValidationError
import graphql.validation.ValidationErrorType
import graphql.validation.rules.NoUnusedFragments
Expand Down Expand Up @@ -161,30 +155,4 @@ class ParseAndValidateTest extends Specification {
then:
!rs.errors.isEmpty() // all rules apply - we have errors
}

def "issue 2740 - evidence of not working"() {
def sdl = '''
type Query {
myquery : String!
}
'''

def registry = new SchemaParser().parse(sdl)
def schema = UnExecutableSchemaGenerator.makeUnExecutableSchema(registry)
def graphQL = GraphQL.newGraphQL(schema).build()

String request = "mutation MyMutation { mymutation }"

when:
def er = graphQL.execute(request)
then:
er.errors.size() == 1

when:
Document inputDocument = new Parser().parseDocument(request)
List<ValidationError> errors = ParseAndValidate.validate(schema, inputDocument)

then:
errors.size() == 1
}
}