Skip to content

How can I bundle a GraphQL schema? #6873

Answered by mischnic
oliversalzburg asked this question in Q&A
Discussion options

You must be logged in to vote

const schemaSdl = fs.readFileSync(path.resolve(__dirname, "./docs.graphql.schema"), "utf8");

The docs don't say this explicitly, but you need to use fs.readFileSync(path.join(__dirname, "something"), "utf8) instead.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@oliversalzburg
Comment options

@mischnic
Comment options

mischnic Sep 3, 2021
Collaborator

Answer selected by oliversalzburg
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
4 participants