import { mutationType , objectType , queryType } from 'nexus' ; export const Query = queryType ( { definition ( t ) { t . crud . user ( ) ; t . crud . users ( ) ; } , } ) ; export const Mutation = mutationType ( { definition : ( t ) => { t . crud . createOnePost ( ) ; t . crud . updateManyPost ( ) ; } , } ) ; export const User = objectType ( { name : 'User' , definition ( t ) { t . model . id ( ) ; t . model . firstName ( ) ; t . model . posts ( { filtering : true , ordering : true } ) ; t . model . location ( ) ; } , } ) ; export const Post = objectType ( { name : 'Post' , definition ( t ) { t . model . id ( ) ; t . model . authors ( { pagination : false } ) ; t . model . status ( ) ; } , } ) ; export const Bubble = objectType ( { name : 'Bubble' , definition ( t ) { t . model . id ( ) ; t . model . createdAt ( ) ; t . model . members ( { pagination : { after : true , first : false } , filtering : { id : true , location : true } , ordering : { firstName : true , locationId : true } , } ) ; } , } ) ; export const Location = objectType ( { name : 'Location' , definition ( t ) { t . model . id ( ) ; t . model . city ( ) ; t . model . country ( ) ; } , } ) ; export const allTypes = [ Query , Mutation , User , Post , Bubble , Location ] ;