Hello,
I'm currently migrating my Apollo server to v2.0 and I'm encounter an issue when trying to import typeDefs from another file.
Following the documentation (https://www.apollographql.com/docs/apollo-server/v2/migration-two-dot.html#gql-tag), it seems I need to write:
const typeDefs = gql${IMPORT_FUNCTION('./schema-file')};
or
const typeDefs = gql(IMPORT_FUNCTION('./schema-file'))
But it doesn't work, it seems to not recognize the IMPORT_FUNCTION.
Is the syntax correct? or IMPORT_FUNCTION should be replaced by something else? What should be the content of the schema_file to work correctly?
Maybe the documentation should be clearer on this point.
Thanks.
Stéphane
Hello,
I'm currently migrating my Apollo server to v2.0 and I'm encounter an issue when trying to import typeDefs from another file.
Following the documentation (https://www.apollographql.com/docs/apollo-server/v2/migration-two-dot.html#gql-tag), it seems I need to write:
const typeDefs = gql
${IMPORT_FUNCTION('./schema-file')};or
const typeDefs = gql(IMPORT_FUNCTION('./schema-file'))
But it doesn't work, it seems to not recognize the IMPORT_FUNCTION.
Is the syntax correct? or IMPORT_FUNCTION should be replaced by something else? What should be the content of the schema_file to work correctly?
Maybe the documentation should be clearer on this point.
Thanks.
Stéphane