Skip to content

Commit

Permalink
Allow for a keyless config (env only). This will eventually be enforced.
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Oct 19, 2018
1 parent a95eed7 commit 3d340c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/apollo-language-server/src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class GraphQLProject {
execute(engineLink, {
query: schemaTagsQuery,
variables: {
id: getIdFromKey(schemaDef.engineKey!)
id: getIdFromKey(schemaDef.engineKey)
},
context: {
headers: { ["x-api-key"]: schemaDef.engineKey },
Expand Down Expand Up @@ -242,7 +242,7 @@ export class GraphQLProject {
execute(engineLink, {
query: engineStatsQuery,
variables: {
id: getIdFromKey(schemaDef.engineKey!)
id: getIdFromKey(schemaDef.engineKey)
},
context: {
headers: { ["x-api-key"]: schemaDef.engineKey },
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function loadSchemaConfig(
obj.endpoint,
!obj.engineKey && defaultEndpoint
),
engineKey: obj.engineKey,
engineKey: obj.engineKey || process.env.ENGINE_API_KEY,
clientSide: obj.clientSide,
extends: obj.extends
};
Expand Down

0 comments on commit 3d340c2

Please sign in to comment.