You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to generate nexus input types as a file instead of runtime generation? We want to customize the default input types. It would be great if the generator generated input types alongside other files (types, query and mutations).
The text was updated successfully, but these errors were encountered:
Hi by version 3.3.1 you can customize your inputs by adding new options to the paljs plugin
import{makeSchema}from'nexus'import*astypesfrom'./types'import{paljs}from'@paljs/nexus'import{join}from'path'exportconstschema=makeSchema({
types,nonNullDefaults: {output: true,},plugins: [paljs({// exclude all fields with this names from any inputexcludeFields: ['password','passwordResetToken','tokenValidDate','passResetExpires',],// take the input and make your filters then return the fields you want to add filterInputs: (input: DMMF.InputType)=>input.fields.filter(field=>filed.name!=='password');}),],outputs: {schema: join(__dirname,'../src/generated/schema.graphql'),typegen: join(__dirname,'../src/generated/nexus.ts'),},contextType: {module: join(__dirname,'context.ts'),export: 'Context',},})
Hi,
Thanks for the lib!
Is it possible to generate nexus input types as a file instead of runtime generation? We want to customize the default input types. It would be great if the generator generated input types alongside other files (types, query and mutations).
The text was updated successfully, but these errors were encountered: