apollographql / apollographql/apollo-tooling

apollo service:check returns "Unknown type" for any extended type which is not defined

Open
#2,206 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

**Intended outcome:**
apollo service:check succeeds

**Actual outcome:**
✔ Loading Apollo Project
✔ Loading Apollo Project
✖ Validate graph composition for service my-service on graph my-graph@test-eu1
→ Unknown type: "MyExternalType".
Comparing schema changes
Reporting result
Error: Unknown type: "MyExternalType".

**How to reproduce the issue:**
on the my-service, add a new type like this:
`extend type MyExternalType @key(fields: "id") {
id: ID! @external
}`
This type is fully defined in another service (e.g: my-other-service) but it has yet to push the schema (this is being checked in the CI)

**Versions**
2.32.1

Contributor guide

Open the contributing guide

Research direction

Start with the Apollo CLI's `apollo service:check` command and reproduce the failure using an extended `MyExternalType` that is defined in another service but has not been pushed. Compare the result with the intended successful check, and verify that the command accepts the external type without reporting it as unknown.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.