Hello I have an apollo federation services, I am g...
# help
b
Hello I have an apollo federation services, I am generating
.graphql
supergraph schema to use it in apollo gateway which is similar to this : https://www.apollographql.com/docs/federation/quickstart/#4-start-the-gateway the problem is when deploy to lambda, it is not deploying the
.graphql
file that I read it in gateway handler, and it throws error :
no such file or directory, open 'schemas/gateway.graphql'"
do you suggest a way to do this?
f
Hey @Bshr Ramadan 2 options: 1. use the
copyFiles
option to copy the file to ur Lambda package - https://docs.serverless-stack.com/constructs/Function#copyfiles 2. use the
loader
option to
import
the file instead of reading it - https://docs.serverless-stack.com/constructs/Function#loader
Let me know if it works for u.
b
Yes that worked! thank you @Frank