Closed mhrisse closed 5 years ago
can you start with and post the result here:
$ SLS_DEBUG=* sls appsync-offline start
Hi @aheissenberger !
Sure:
SLS_DEBUG=* sls appsync-offline start
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command dynamodb
Serverless: Load command dynamodb:migrate
Serverless: Load command dynamodb:seed
Serverless: Load command dynamodb:start
Serverless: Load command dynamodb:noStart
Serverless: Load command dynamodb:remove
Serverless: Load command dynamodb:install
Serverless: Load command delete-appsync
Serverless: Load command graphql-playground
Serverless: Load command deploy-appsync
Serverless: Load command update-appsync
Serverless: Load command appsync-offline
Serverless: Load command appsync-offline:start
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Invoke appsync-offline:start
Serverless: AppSync Standalone
Serverless: dynamoDB started: http://localhost:8000/
Serverless: ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
This is why I am calling out. I am stuck and do not even now where to start, as the message is too generic to google or even search in the code. Is there a way to expose a more detailed debug message?
@mhrisse try SLS_DEBUG=* NODE_DEBUG=appsync-* sls appsync-offline start
try to user the newest version of the Serverless framework and node_modules
Hi @aheissenberger !
I am afraid it wont help, all same as before.
sls --version
is 1.42.2
npm i
ran SLS_DEBUG=* NODE_DEBUG=appsync-* sls appsync-offline start
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command delete-appsync
Serverless: Load command graphql-playground
Serverless: Load command deploy-appsync
Serverless: Load command update-appsync
Serverless: Load command appsync-offline
Serverless: Load command appsync-offline:start
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Invoke appsync-offline:start
Serverless: AppSync Standalone
Serverless: ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
@aheissenberger I've actually tracked down the cause of this
It looks like the multiple graphql files is not supported, but it is supported in the serverless-appsync-plugin
Our serverless config looks something like this...
appSync:
schema:
- "src/api/schema/file1.graphql"
- "src/api/schema/file2.graphql"
- "src/api/schema/schema.graphql"
When I run sls offline it gave me the following error
ERROR: Error: schema file: /Users/.../workspace/api/packages/sls-lambda/schema.graphql must exist
If I manually combine our graphql files and dump it in the default location everything works 100% ;)
Oh great - I suggest to talk to the awesome guys who wrote the AppSync Emulator maybe they can add this feature - I am only maintaining this simple wrapper for Serverless integration.
Cool I've added a work around for the moment that we can live with
find ./src/api/schema -name "*.graphql" -o -name "schema.graphql" | xargs cat > ./graphql.schema
we'll just merge all the files before running sls offline and then ignore it in .gitignore 😂
Hi!
First of all thanks for doing this project, well done.
We are setting up
serverlesss-appsync-offline
and only want to use lambdas as datasource.I read the docs, but unfortunately I cannot find any simple example with serverless and lambda on the web to get us started. If you can help us out with this issue, we will happily contribute this back here. @aheissenberger
However we have run into the following problem:
terminal output:
with no working endpoint and the
ERROR
above.or
with no route for graphql, respectively.
serverless.yml:
schema.graphql:
Any pointers very much appreciated!