plugin-graphql
plugin-graphql copied to clipboard
ID being stripped from Query
My model has ID
, but it's being stripped from the query after being built. How do I force ID
to be a part of the query without creating a custom query?
export default class User extends Model {
static entity = 'users'
static primaryKey = ['id']
static fields() {
return {
id: this.attr(null),
firstName: this.string(''),
}
}
produces this graphQL query...
query Users { query users { firstName } }
I expect it to product this query...
query Users { query users { id firstName } }
When running User.fetch();
it causes ID
to be set to _no_key_48466
. My schema contains ID
. Here is my graphQL schema.
type User {
id: ID! @id
firstName: String
}
Thanks in advance.
Hi, could you please check if this still is a problem in the latest release?