plugin-graphql icon indicating copy to clipboard operation
plugin-graphql copied to clipboard

Forcing upcase on model name in buildQuery overwites value set by adapter

Open freakent opened this issue 4 years ago • 0 comments

In source file plugin-graphql/blob/master/src/graphql/query-builder.ts, function name buildQuery(...). I don't think this uppcaseFirstLetter(name) should be used here. It appears to be changing a value set by a custom adapter.

// build query const query: string = \${type} ${upcaseFirstLetter(name)}${this.buildArguments( model, args, true, filter, true, field )} {\n` + ` ${this.buildField(model, multiple, args, [], name, filter, true)}\n` + }; `

Impacts using a custom adapter to set the name of a mutation with getNameforPersit(model).

freakent avatar Jul 02 '20 12:07 freakent