Skip to content

Can use @cacheControl directive with codegen #791

@saspre

Description

@saspre

When I try and generate flow types for my schema I get an error saying:

Failed to generate types for src/modules/compute/service/ui/__fixtures__/query.graphql
 ›   Error: Error initializing Apollo GraphQL project "Unnamed Project": Error: Error in "Loading schema for Unnamed Project":
 ›   Error: Unknown directive "cacheControl".

My cmd to generate looks like this.

 ./node_modules/.bin/apollo client:codegen ${file}.types.js \
    --localSchemaFile ${PATH_TO_MERGED_SCHEMA}  \
    --target flow \
    --no-addTypename \
    --includes ${file} \
    --outputFlat \
    --useFlowExactObjects \
    --passthroughCustomScalars

It worked fine on version 1.9.2, but breaks on version 2.1.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions