Skip to content

VSCode: Multiple local schema files validation problem in 1.10.0 #1483

@typhoon2k

Description

@typhoon2k

Intended outcome:

In our project we are using multiple schema files. As per recommendations for this scenario our apollo.config.js looks approximately the following:

module.exports = {
    client: {
        service: {
            name: "blabla-api",
            localSchemaFile: "./src/graphql/schema/blabla-api.graphql"
        },
        includes: [
            "**/src/graphql/schema/blabla-this-api.graphql",
            "**/src/graphql/schema/blabla-that-api.graphql",
            "**/src/graphql/operations/**/*.graphql"
        ]
    }
};

Until version 1.10.0 we didn't had any problems with this configuration - syntax highlighting and code completion was working fine.

Actual outcome:

After update to 1.10.0 we are getting "Local field ... must have a @client directive" validation exceptions in all operation graphql files, which are using fields defined in schema extension files blabla-this-api.graphql and blabla-that-api.graphql.

How to reproduce the issue:

Create similar setup with multiple local schema files.

Versions

1.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions