Skip to content

Type extensions doesn't allow use of repeatable Directives. #2114

@Me1kaa

Description

@Me1kaa

Hello here is the case which doesn't work in my code. If you use repeatable directives in Query extension - this doesn't work.
If you use nested types or non extending Query - everything fine.

import graphql.schema.idl.RuntimeWiring;
import graphql.schema.idl.SchemaGenerator;
import graphql.schema.idl.SchemaParser;

public class TestMain {

    public static void main(String[] args) {
        SchemaParser schemaParser = new SchemaParser();

        var registry = schemaParser.parse(
            "type Query {}" +
                "directive @IamRepeatable repeatable on FIELD_DEFINITION" +
                " extend type Query { " +
                "   test: String" +
                "        @IamRepeatable" +
                "        @IamRepeatable" +
                "}");

        new SchemaGenerator().makeExecutableSchema(registry, RuntimeWiring.newRuntimeWiring().build());
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions