Skip to content

Commit f2a6707

Browse files
committed
Fix
1 parent acbbf16 commit f2a6707

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/gateway/src/commands/handleReportingConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ export function handleReportingConfig(
8282

8383
if (opts.apolloKey) {
8484
ctx.log.info(`Configuring Apollo GraphOS registry reporting`);
85-
if (!opts.apolloGraphRef) {
85+
if (!opts.apolloGraphRef?.includes('@')) {
8686
ctx.log.error(
87-
`Apollo GraphOS requires a graph ref in the format <graph-id>@<graph-variant>. Please provide a valid graph ref.`,
87+
`Apollo GraphOS requires a graph ref in the format <graph-id>@<graph-variant>. Please provide a valid graph ref ${opts.apolloGraphRef ? `not ${opts.apolloGraphRef}` : ''}.`,
8888
);
8989
process.exit(1);
9090
}

packages/gateway/src/commands/supergraph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const addCommand: AddCommand = (ctx, cli) =>
160160
hiveRegistryToken,
161161
hiveUsageTarget,
162162
hiveUsageAccessToken,
163-
apolloGraphRef,
163+
apolloGraphRef: apolloGraphRef || schemaPathOrUrl,
164164
apolloKey,
165165
});
166166
if (reporting) {

0 commit comments

Comments
 (0)