I’m trying to get `apollo-codegen` to work with Gr...
# prisma-whats-new
j
I’m trying to get
apollo-codegen
to work with Graphcool. It looks like the recently added
@module
directive (and
@isUnique
as well) break it:
Copy code
$ apollo-codegen introspect-schema <simple Graphcool endpoint> --output schema.json
$ apollo-codegen generate types.graphql --target ts --schema schema.json
.../types.graphql: Unknown directive "model".
.../types.graphql: Unknown directive "isUnique".
.../types.graphql: Unknown directive "isUnique".
j
Works fine for me. I think it’s the TS target that breaks it. Maybe use gql2ts instead?
j
Is that with the new Graphcool framework or with the previous version of Graphcool? For this to happen, you need to have a local
types.graphql
with
@model
or
@isUnique
. I get the same error regardless of what I use for
--target
.