menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Studio
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team

Registering my schema with Apollo studio using the option "From Apollo Server"

July 6, 2020 at 1:39pm

Registering my schema with Apollo studio using the option "From Apollo Server"

July 6, 2020 at 1:39pm
Following the official tutorial at apollographql.com/tutorial/production/ and am on step 5 of the tutorial. Have a .env.example file with api key in /server inside the project folder. Inside the .env.example, I have just one line starting with APOLLO_KEY= I have my api key after the assignment sign above without any single or double quotes.
Inside the constructor of the Apollo server, I have engine: {reportSchema: true} but I see only a spinning wheel and a message Awaiting schema...
Clicked on the Done button and saw unconfigured and a green button with label Finish setup. Clicked it and see the same spinning wheel and the message Awaiting schema...
What am I doing wrong?
How to register this schema with the Apollo Studio if the official tutorial steps don't work?

July 6, 2020 at 2:45pm
Renamed the file .env.example to .env and put a new APOLLO_KEY in it but even that did not work.
  • reply
  • like
I tried everything given above and it did not work and then repeating them many times, it suddenly worked. I don't know what was the problem and have no clue why it did not work earlier and why it worked later on.
  • reply
  • like
For me it appears the issue was that dotenv was not set up as a dev dependency, so creating the .env file didn't do anything. After installing dotenv, and adding a require("dotenv").config() to the top of the index.js it then worked
like-fill
2
  • reply
  • like

July 7, 2020 at 6:02pm
Thanks for pointing this out - it has now been addressed in the tutorial.
  • reply
  • like
For me it appears the issue was that dotenv was not set up as a dev dependency, so creating the .env file didn't do anything. After installing dotenv, and adding a require("dotenv").config() to the top of the index.js it then worked
it worked for me! thaks
  • reply
  • like

July 8, 2020 at 6:31am
I had the require statement and it still did not work. Even restarting the server, visual code, and logging in and out from the Apollo Studio did not work and then suddenly it worked and registered two apps. It seems that their system has gliteches and with the passage of time might work better.
  • reply
  • like