apollographql / apollographql/apollo-tooling
Whitelisting issue while following the apollo documentation
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I am attempting to follow the following document to whitelist queries for my application:
> https://www.apollographql.com/docs/graph-manager/operation-registry/#1-install-the-apollo-command-line-tool
I run my server locally and get the following:
> [WARN] Wed Apr 15 2020 15:50:38 GMT-0700 (Pacific Daylight Time) apollo-server:apollo-server-plugin-operation-registry No manifest found for tag "current" at **.json. Ensure this server's schema has been published with 'apollo service:push' and that operations have been registered with 'apollo client:push'.
So I attempted to push my service and did the following:
C02TP30CHTD5% npx apollo service:push \
--key \
--endpoint http://localhost:4000
› Warning: apollo update available from 2.25.0 to 2.27.0.
✔ Loading Apollo Project
✔ Uploading service to Apollo Graph Manager
╔════════╤════════════════════════════╤═════════╗
║ id │ graph │ tag ║
╟────────┼────────────────────────────┼─────────╢
║ 0792c1 │ **-graphql-server-dev │ current ║
Since I was still receiving the error I then attempted to push the client:
> C02TP30CHTD5% npx apollo client:push \
--key s= \
--clientName current \
--clientVersion 0.01 \
--includes="/src/typedefs/sam-typedef.{ts,js,graphql}"
› Warning: apollo update available from 2.25.0 to 2.27.0.
⠋ Loading Apollo Project
Extracting operation from client, current@0.01
Checked operations against *-graphql-server-dev@current
Pushing operations to operation registry
CLIError: Error in "Loading schema for *-graphql-server-dev": Error: Type "Query" already exists in the schema. It cannot also be defined in this type definition.
Field "Query.sam2PublicProfile" already exists in the schema. It cannot also be defined in this type extension.
at Object.error
...
...
...
... deleted lines
→ Field "Query.sam2PublicProfile" already exists in the schema. It cannot also be defined in this type extension.
I am just trying to see if I can approve some queries, the parameters they require and set this up for my production pipeline. I do not understand what I am missing from the documentation.
Contributor guide
Research direction
Reproduce the documented workflow with `npx apollo service:push` and `npx apollo client:push`, using the operation-registry warning and schema-loading error as starting points. Check the Apollo Graph Manager operation-registry documentation and the supplied schema and operation include pattern; done means the workflow no longer produces the duplicate `Query` and `sam2PublicProfile` errors, or the documentation explains the required setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100