My site is https://conduit-graphql.netlify.app/graphql, it’s a netlify function using apollo-server-lambda. And I use apollo-link-http and apollo-persist-query in client. When I use netlify dev in local environment, It’s work normal. But When I deploy to netlify functions, it return error response to persist queries. For example, here is a request, I want get all articles(I have disable the cache) , it should return getAllArticles.
But it return getprofile
{"data":{"getProfile":{"id":"5f041605f60e5b3a005fb0b1","username":"13664","bio":"","image":"","following":false,"__typename":"Profile"}}}
And I try to open the request in a new window, it shows
{
"errors": Array[1][
{
"message": "PersistedQueryNotFound",
"extensions": {
"code": "PERSISTED_QUERY_NOT_FOUND"
}
}
]
}
if it help, my netlify functions code is here GitHub - jameslahm/conduit-server-graphql
And client code is here conduit-frontend-web/api.ts at graphql · jameslahm/conduit-frontend-web · GitHub
Thanks very much!