1.6.26 has a problem, that is
if you don't want a fixed version number and set version option to "", you will get a wrong url
const apolloServer = new ApolloServer({
schema,
context: fastify,
playground: {
version: "",
cdnUrl: "",
settings: {
"editor.theme": "light",
},
},
});
fastify.register(fastifyStatic, {
root: path.join(__dirname, "../node_modules/@apollographql/graphql-playground-react/"),
prefix: "/@apollographql/graphql-playground-react/"
});
will contribute to
<link rel="stylesheet" href="/@apollographql/graphql-playground-reactbuild/static/css/index.css">
I found a workaround for the moment,you must set the version option and set route correctly
const apolloServer = new ApolloServer({
schema,
context: fastify,
playground: {
version: "1.6.26", // must set version
cdnUrl: "",
settings: {
"editor.theme": "light",
},
},
});
fastify.register(fastifyStatic, {
root: path.join(__dirname, "../node_modules/@apollographql/graphql-playground-react/"),
prefix: "/@apollographql/[email protected]/", // must use corresponding version
});
1.6.29 has fixed this bug
1.6.26 has a problem, that is
if you don't want a fixed version number and set version option to "", you will get a wrong url
will contribute to
I found a workaround for the moment,you must set the version option and set route correctly
1.6.29 has fixed this bug