apollographql / apollographql/vscode-graphql

`TypeError: Cannot read properties of undefined (reading 'name')`

Open
#64 1 comment 6 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
78
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Receiving this after the latest VSCode update. Anyone with the same error?

```
/.vscode/extensions/apollographql.vscode-apollo-1.19.9/lib/language-server/errors/validation.js:103
selectsClientFieldSet = Boolean(clientFields && clientFields.includes(fieldDef.name));
^

TypeError: Cannot read properties of undefined (reading 'name')
```

┆Issue is synchronized with this [Jira Task](https://apollographql.atlassian.net/browse/NEBULA-1075) by [Unito](https://www.unito.io)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the error after the VSCode update and inspect lib/language-server/errors/validation.js around line 103, where fieldDef.name is accessed. Trace why fieldDef is undefined for the affected GraphQL input; done means validation no longer throws this TypeError for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.