-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathIssue2114.groovy
More file actions
28 lines (22 loc) · 833 Bytes
/
Issue2114.groovy
File metadata and controls
28 lines (22 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package graphql
import graphql.schema.idl.RuntimeWiring
import graphql.schema.idl.SchemaGenerator
import graphql.schema.idl.SchemaParser
import spock.lang.Specification
class Issue2114 extends Specification {
def "allow use of repeatable directives on extensions"() {
given:
def spec = "type Query {}" +
"directive @IamRepeatable repeatable on FIELD_DEFINITION" +
" extend type Query { " +
" test: String" +
" @IamRepeatable" +
" @IamRepeatable" +
"}"
when:
def registry = new SchemaParser().parse(spec)
def graphQLSchema = new SchemaGenerator().makeExecutableSchema(registry, RuntimeWiring.newRuntimeWiring().build())
then:
graphQLSchema != null
}
}