apollographql / apollographql/apollo-tooling

Cannot return null for non-nullable field ServiceMutation.upsertImplementingServiceAndTriggerComposition

Open
#2,364 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:** For `apollo service:push` to successfully and deterministically push the updated schema.

**Actual outcome:** Roughly 50% of the time, `apollo service:push` throws a `Validation Error`: `Cannot return null for non-nullable field ServiceMutation.upsertImplementingServiceAndTriggerComposition`. If we run the command again while making NO changes, there is a 50% chance it succeeds.

```
> apollo service:push --variant development --serviceName serviceName --serviceURL http://localhost:4200/graphql --localSchemaFile /root/project/path/to/schema.gql
Loading Apollo Project
✔ Loading Apollo Project
⠼ Uploading service to Apollo
✔ Loading Apollo Project
⠇ Uploading service to Apollo
✔ Loading Apollo Project
⠴ Uploading service to Apollo
✔ Loading Apollo Project
⠏ Uploading service to Apollo
[GraphQL error]: Validation error
[GraphQL error]: Cannot return null for non-nullable field ServiceMutation.upsertImplementingServiceAndTriggerComposition.
✔ Loading Apollo Project
✖ Uploading service to Apollo

Error: Validation error
Cannot return null for non-nullable field
ServiceMutation.upsertImplementingServiceAndTriggerComposition
```

**How to reproduce the issue:** It has been very inconsistent, sometimes happening two or three times in a row before succeeding.

**Versions**
```
> apollo --version
apollo/2.33.4 darwin-x64 node-v12.13.1
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the intermittent failure with apollo/2.33.4 using the documented apollo service:push command and the supplied variant, service name, URL, and local schema file. Compare successful and failing uploads around the ServiceMutation.upsertImplementingServiceAndTriggerComposition validation error. Done means the command pushes the updated schema successfully and deterministically.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.