Uknown types and fields - but they work in the app
See original GitHub issueVersion and Environment Details
Operation system:
MacOS 10.14.5
IDE name and version:
Webstorm 2019.1 and the 2019.2 EAP
Plugin version:
2.2.0
Expected Behaviour
Recognize valid GraphQL types and fields.
Actual Behaviour
Highlights MemberInput as Unknown type “MemberInput” and addMember as Unknown field “addMember”. All my queries and mutations on all components have the same issue. If I uncheck the plugin in the IDE then this flagging goes away. The mutations and queries perform as expected either way so this is a plugin, not code, issue.
const addMember = gql `
mutation addMember($input: MemberInput!) {
addMember (input: $input) {
first_name
last_name
user_name
}
}`;
this.apollo.mutate({
mutation: addMember,
variables: {
input: {
first_name: first_name,
last_name: last_name,
user_name: user_name,
}
},
})
.subscribe(result => {
console.log('result.data in subscribe: ', result.data);
errors = result.errors;
console.log('errors in mutate', errors)
});
Steps to Reproduce / Link to Repo with Reproduction and Instructions
Just writing a query or mutation causes this. The schema is compiled by Nestjs on the server as such:
graphql.schema.ts
export class MemberInput {
first_name: string;
last_name: string;
user_name: string;
}
export abstract class IMutation {
abstract addMember(input: MemberInput): Member | Promise<Member>;
abstract updateMember(member_id: number, input: MemberInput): Member | Promise<Member>;
abstract deleteMember(member_id: number): Member | Promise<Member>;
}
This behavior started recently. I didn’t change the IDE version and I also tried 2019.2 EAP.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19
Top Results From Across the Web
Different field types in Zaps - Zapier
Boolean fields can only have two values: "true" or "false". Depending on the app, these values may be different, such as "0" for...
Read more >PowerApps Entities: How To Add Different Types of Fields
Learn how to add text fields, calculated fields, and other types of fields when you're working with PowerApps entities.
Read more >Introduction to data types and field properties - Microsoft Support
Overview of data types and field properties in Access, and detailed data type reference. including Memo, Date/Time, and Text.
Read more >unknown field in struct literal - Stack Overflow
I 'm trying to create a struct, and it is giving me an error, telling me the field is unknown. ... All The...
Read more >Error: Unknown or inaccessible field | Looker - Google Cloud
Option 1: The field does not exist If the field user_order_facts. lifetime_orders is referenced in LookML fields but does not exist as a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
He never came back.
A couple of things to check:
.graphql
file, then verify that it’s within the Project scope, e.g. not excluded or in an excluded folder