Apollo-tooling: support imports(graphql-import) in .graphql files

Created on 17 Jul 2018  路  1Comment  路  Source: apollographql/apollo-tooling

enums.graphql

enum Role {
 ADMIN
 USER
}

server.graphql

# import Role from "enums.graphql"
...

apollo codegen:generate --schema ./schema/server.graphql..
Error : Error: Unable to read file ./schema/server.graphql. Type "Role" not found in document.

Most helpful comment

I see this is closed but I'm still having issues with the same thing. I'm trying to import in my main schema.graphql stuff generated by Prisma in a prisma.graphql file. This does not work and as far as I can tell it is because the import isn't working with codegen? Maybe I'm missing something else?

>All comments

I see this is closed but I'm still having issues with the same thing. I'm trying to import in my main schema.graphql stuff generated by Prisma in a prisma.graphql file. This does not work and as far as I can tell it is because the import isn't working with codegen? Maybe I'm missing something else?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericbiewener picture ericbiewener  路  4Comments

arthens picture arthens  路  3Comments

u-ashish picture u-ashish  路  4Comments

reichhartd picture reichhartd  路  4Comments

atbtechgit picture atbtechgit  路  3Comments