I am trying to publish my GraphQL schema to Apollo Engine with the apollo schema:publish command. According to the docs, I should be able to give --endpoint the path to a local .graphql file that contains my schema. However, when I try to do this, the command errors:
$ apollo schema:publish --endpoint=schema.graphql --key="REDACTED"
✔ Loading Apollo Project
✖ Uploading service to Engine
→ Only absolute URLs are supported
TypeError: Only absolute URLs are supported
at getNodeRequestOptions (~/.nvm/versions/node/v9.11.2/lib/node_modules/apollo/node_modules/node-fetch/lib/index.js:1265:9)
at ~/.nvm/versions/node/v9.11.2/lib/node_modules/apollo/node_modules/node-fetch/lib/index.js:1335:19
at new Promise (<anonymous>)
at fetch (~/.nvm/versions/node/v9.11.2/lib/node_modules/apollo/node_modules/node-fetch/lib/index.js:1332:9)
at ~/.nvm/versions/node/v9.11.2/lib/node_modules/apollo/node_modules/apollo-link-http/lib/bundle.umd.js:91:17
at new Subscription (~/
My GraphQL API is authenticated, so I can't point apollo directly at the endpoint as it won't have authentication. I was able to get around this by running my server locally and removing the authentication guards from the API endpoint, but I don't think that's a good long-term approach.
I am trying to publish my GraphQL schema to Apollo Engine with the
apollo schema:publishcommand. According to the docs, I should be able to give--endpointthe path to a local .graphql file that contains my schema. However, when I try to do this, the command errors:My GraphQL API is authenticated, so I can't point
apollodirectly at the endpoint as it won't have authentication. I was able to get around this by running my server locally and removing the authentication guards from the API endpoint, but I don't think that's a good long-term approach.