File tree Expand file tree Collapse file tree 5 files changed +12
-25
lines changed
Expand file tree Collapse file tree 5 files changed +12
-25
lines changed Original file line number Diff line number Diff line change 11{
2+ "printWidth": 100,
23 "trailingComma": "none",
34 "tabWidth": 2,
45 "semi": true,
Original file line number Diff line number Diff line change @@ -19,17 +19,14 @@ export type Mutation = {
1919 addUser : User ;
2020} ;
2121
22-
2322export type MutationAddProprietyArgs = {
2423 body ?: InputMaybe < InputProprietyType > ;
2524} ;
2625
27-
2826export type MutationAddReviewArgs = {
2927 body ?: InputMaybe < InputReviewType > ;
3028} ;
3129
32-
3330export type MutationAddUserArgs = {
3431 body ?: InputMaybe < InputUserType > ;
3532} ;
@@ -56,17 +53,14 @@ export type Query = {
5653 userList : Array < User > ;
5754} ;
5855
59-
6056export type QueryProprietyArgs = {
6157 id ?: InputMaybe < Scalars [ 'ID' ] > ;
6258} ;
6359
64-
6560export type QueryReviewByUserArgs = {
6661 id ?: InputMaybe < Scalars [ 'ID' ] > ;
6762} ;
6863
69-
7064export type QueryUserArgs = {
7165 id : Scalars [ 'ID' ] ;
7266} ;
Original file line number Diff line number Diff line change @@ -3,25 +3,21 @@ import { resolverType } from 'fast-graphql';
33import * as schemaType from '@/graphql/generated/schemaType' ;
44
55const Query = {
6- proprietyList : ( ) => {
6+ proprietyList : ( parent : any , args : any , ctx : any ) => {
77 return [ { title : 'Nextjs' } ] ;
88 } ,
99
10- propriety : (
11- parent : any ,
12- args : any ,
13- ctx : any
14- ) : schemaType . Query [ 'propriety' ] => {
10+ propriety : ( parent : any , args : any , ctx : any ) : schemaType . Query [ 'propriety' ] => {
1511 const { id } = args ;
1612
1713 return { title : 'Nextjs' , id } ;
18- } ,
14+ }
1915} ;
2016
2117const Mutation = {
22- addPropriety : ( body : any ) : schemaType . Mutation [ 'addPropriety' ] => {
18+ addPropriety : ( parent : any , args : any , ctx : any ) : schemaType . Mutation [ 'addPropriety' ] => {
2319 return { title : 'this is addPropriety mutuation' } ;
24- } ,
20+ }
2521} ;
2622
2723const resolver : resolverType = { Query, Mutation } ;
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import { resolverType } from 'fast-graphql';
33const Query = {
44 reviewByUser : ( id : any ) => {
55 return { id : 'reviewByUser' } ;
6- } ,
6+ }
77} ;
88
99const Mutation = {
1010 addReview : ( body : any ) => {
1111 return { name : 'this is addReview mutuation' } ;
12- } ,
12+ }
1313} ;
1414
1515const resolver : resolverType = { Query, Mutation } ;
Original file line number Diff line number Diff line change @@ -7,21 +7,17 @@ const Query = {
77 return [ { email : 'Nextjs' , id : 'sqdqsd' , photo : 'qsdqsdqs' } ] ;
88 } ,
99
10- user : (
11- _parent : any ,
12- _args : schemaType . QueryUserArgs ,
13- _context : any
14- ) : schemaType . Query [ 'user' ] => {
15- const { id } = _args ;
10+ user : ( parent : any , args : any , ctx : any ) : schemaType . Query [ 'user' ] => {
11+ const { id } = args ;
1612 console . log ( '🚀 ~ file: user.ts ~ line 17 ~ id' , id ) ;
1713 return { email : 'Nextjs' , id : 'sqdqsd' , photo : 'qsdqsdqs' } ;
18- } ,
14+ }
1915} ;
2016
2117const Mutation = {
2218 addUser : ( body : any ) => {
2319 return { name : 'this is addUser mutuation' } ;
24- } ,
20+ }
2521} ;
2622
2723const resolver : resolverType = { Query, Mutation } ;
You can’t perform that action at this time.
0 commit comments