Я хотел бы добавить аргумент к моему запросу updateOne в graphql-compose-mongoose. Я видел, что для этого есть сгенерированный тип ввода: UpdateOneComplaintInput
complaintUpdateOne: Resolver {
name: 'updateOne',
displayName: 'Complaint.updateOne',
parent: null,
kind: 'mutation',
description:
'Update one document: 1) Retrieve one document via findOne. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it.',
type: TypeComposer { gqType: UpdateOneComplaintPayload },
args:
{ record: { type: UpdateOneComplaintInput! },
filter:
{ type: FilterUpdateOneComplaintInput,
description: 'Filter by fields' },
sort: { type: [EnumTypeComposer] },
skip: { type: 'Int' } },
resolve: [Function: resolve] }
как мне перехватить и изменить этот ввод при создании схемы?
читая исходный код, я дошел до того, что мы можем вызвать composeWithMongoose (scheam, {schemaComposer: OwnSC}) (зная, что OwnSC имеет тип server / node_modules / graphql-compose / lib / SchemaComposer.d.ts)
Этот комплекс швов для меня