import { stringArg, nonNull, queryField } from "nexus"; const Zipcode = { addType(builder) { builder.addType( queryField("dutchiePlusZipcode", { type: nonNull("DutchiePlusZipcodeEntityResponse"), args: { zipcode: nonNull(stringArg()), }, }) ); }, extend(config) { config.resolversConfig["Query.dutchiePlusZipcode"] = { middlewares: [ async (...[, , args]) => { return await strapi .service("plugin::dutchie-plus.zipcode") .graphqlFindOne(args); }, ], auth: false, }; }, }; export default Zipcode;