From 6276438f02eba3ea5b7efe6c94cd002b29ac5d2e Mon Sep 17 00:00:00 2001 From: Andrew Palm Date: Fri, 7 Dec 2018 12:38:30 -0500 Subject: [PATCH 1/2] Speed up generation by disabling prettifying for types --- packages/graphqlgen/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/graphqlgen/src/index.ts b/packages/graphqlgen/src/index.ts index f2b3acc6..922a9d0c 100644 --- a/packages/graphqlgen/src/index.ts +++ b/packages/graphqlgen/src/index.ts @@ -107,7 +107,10 @@ export function generateCode( ), modelMap: generateCodeArgs.modelMap!, } - const generatedTypes = generateTypes(generateArgs, generateCodeArgs) + const generatedTypes = generateTypes(generateArgs, { + ...generateCodeArgs, + prettify: false, + }) const generatedResolvers = generateResolvers(generateArgs, generateCodeArgs) // const generatedModels = generateModels(generateArgs, {schema, prettify, prettifyOptions, language}) From 94dde2e2b1a04e8209990025c8c0f415161c1872 Mon Sep 17 00:00:00 2001 From: Andrew Palm Date: Fri, 7 Dec 2018 12:40:40 -0500 Subject: [PATCH 2/2] Update snapshots --- .../flow/__snapshots__/basic.test.ts.snap | 1728 ++-- .../__snapshots__/large-schema.test.ts.snap | 7695 +++++++++------- .../__snapshots__/basic.test.ts.snap | 2383 +++-- .../__snapshots__/large-schema.test.ts.snap | 8067 ++++++++++------- 4 files changed, 12240 insertions(+), 7633 deletions(-) diff --git a/packages/graphqlgen/src/tests/flow/__snapshots__/basic.test.ts.snap b/packages/graphqlgen/src/tests/flow/__snapshots__/basic.test.ts.snap index 124e009d..afab7a76 100644 --- a/packages/graphqlgen/src/tests/flow/__snapshots__/basic.test.ts.snap +++ b/packages/graphqlgen/src/tests/flow/__snapshots__/basic.test.ts.snap @@ -1,110 +1,163 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`basic enum 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { User } from \\"../../../fixtures/enum/types-flow\\"; -type Context = any; +import type { GraphQLResolveInfo } from 'graphql' +import type { User } from '../../../fixtures/enum/types-flow' +type Context = any + -type EnumAnnotation = \\"EDITOR\\" | \\"COLLABORATOR\\"; -type EnumAsUnionType = \\"RED\\" | \\"GREEN\\" | \\"BLUE\\"; + type EnumAnnotation = 'EDITOR' | 'COLLABORATOR' +type EnumAsUnionType = 'RED' | 'GREEN' | 'BLUE' -// Types for Query -export const Query_defaultResolvers = {}; + // Types for Query + export const Query_defaultResolvers = {} -export interface Query_Args_CreateUser { - name: string; - type: EnumAnnotation; -} + -export type Query_CreateUser_Resolver = ( - parent: {}, - args: Query_Args_CreateUser, - ctx: Context, - info: GraphQLResolveInfo -) => User | null | Promise; + + export interface Query_Args_CreateUser { + name: string, +type: EnumAnnotation + } + -export interface Query_Resolvers { - createUser: ( + + export type Query_CreateUser_Resolver = + ( parent: {}, args: Query_Args_CreateUser, ctx: Context, - info: GraphQLResolveInfo - ) => User | null | Promise; -} + info: GraphQLResolveInfo, + ) + => User| null | Promise + + + + export interface Query_Resolvers { + + createUser: + ( + parent: {}, + args: Query_Args_CreateUser, + ctx: Context, + info: GraphQLResolveInfo, + ) => User| null | Promise, + + } + + + + + // Types for User + export const User_defaultResolvers = { + id: (parent: User) => parent.id, +name: (parent: User) => parent.name, +enumAsUnionType: (parent: User) => parent.enumAsUnionType, + } -// Types for User -export const User_defaultResolvers = { - id: (parent: User) => parent.id, - name: (parent: User) => parent.name, - enumAsUnionType: (parent: User) => parent.enumAsUnionType -}; + + + -export type User_Id_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_Name_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_EnumAnnotation_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => EnumAnnotation | Promise; - -export type User_EnumAsUnionType_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => EnumAsUnionType | Promise; - -export interface User_Resolvers { - id: ( + + + + + export type User_Id_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - name: ( + export type User_Name_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - enumAnnotation: ( + export type User_EnumAnnotation_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => EnumAnnotation | Promise; + info: GraphQLResolveInfo, + ) + => EnumAnnotation | Promise + - enumAsUnionType: ( + export type User_EnumAsUnionType_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => EnumAsUnionType | Promise; -} + info: GraphQLResolveInfo, + ) + => EnumAsUnionType | Promise + + + + export interface User_Resolvers { + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + name: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + enumAnnotation: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => EnumAnnotation | Promise, + + enumAsUnionType: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => EnumAsUnionType | Promise, + + } + + + + + + export interface Resolvers { - Query: Query_Resolvers; - User: User_Resolvers; + Query: Query_Resolvers, +User: User_Resolvers } -" + + + " `; exports[`basic enum 2`] = ` @@ -160,67 +213,101 @@ export const resolvers: Resolvers = { `; exports[`basic scalar 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { AddMemberPayload } from \\"../../../fixtures/scalar/flow-types\\"; -type Context = any; +import type { GraphQLResolveInfo } from 'graphql' +import type { AddMemberPayload } from '../../../fixtures/scalar/flow-types' +type Context = any + -// Types for Mutation -export const Mutation_defaultResolvers = {}; + -export interface Mutation_AddMemberData { - email: string; - projects: string[]; -} + // Types for Mutation + export const Mutation_defaultResolvers = {} -export interface Mutation_Args_AddMember { - data: AddMemberData; -} + export interface Mutation_AddMemberData { + email: string,projects: string[] + } -export type Mutation_AddMember_Resolver = ( - parent: {}, - args: Mutation_Args_AddMember, - ctx: Context, - info: GraphQLResolveInfo -) => AddMemberPayload | Promise; + + export interface Mutation_Args_AddMember { + data: AddMemberData + } + -export interface Mutation_Resolvers { - addMember: ( + + export type Mutation_AddMember_Resolver = + ( parent: {}, args: Mutation_Args_AddMember, ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; -} + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + + + + export interface Mutation_Resolvers { + + addMember: + ( + parent: {}, + args: Mutation_Args_AddMember, + ctx: Context, + info: GraphQLResolveInfo, + ) => AddMemberPayload | Promise, + + } + -// Types for AddMemberPayload -export const AddMemberPayload_defaultResolvers = { - json: (parent: AddMemberPayload) => parent.json -}; + + + // Types for AddMemberPayload + export const AddMemberPayload_defaultResolvers = { + json: (parent: AddMemberPayload) => parent.json, + } -export type AddMemberPayload_Json_Resolver = ( - parent: AddMemberPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; + -export interface AddMemberPayload_Resolvers { - json: ( + + + + export type AddMemberPayload_Json_Resolver = + ( parent: AddMemberPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; -} + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + + export interface AddMemberPayload_Resolvers { + + json: + ( + parent: AddMemberPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string| null | Promise, + + } + + + + + export interface Resolvers { - Mutation: Mutation_Resolvers; - AddMemberPayload: AddMemberPayload_Resolvers; + Mutation: Mutation_Resolvers, +AddMemberPayload: AddMemberPayload_Resolvers } -" + + + " `; exports[`basic scalar 2`] = ` @@ -272,257 +359,372 @@ export const resolvers: Resolvers = { `; exports[`basic schema 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { Number } from \\"../../../fixtures/basic/types-flow\\"; -type Context = any; +import type { GraphQLResolveInfo } from 'graphql' +import type { Number } from '../../../fixtures/basic/types-flow' +type Context = any + -// Types for Query -export const Query_defaultResolvers = {}; + -export interface Query_Args_Custom_with_arg { - id: number; -} + // Types for Query + export const Query_defaultResolvers = {} + + + + -export interface Query_Args_Custom_with_custom_arg { - id: Number; -} -export interface Query_Args_Scalar_with_arg { - id: number; -} -export interface Query_Args_Scalar_with_custom_arg { - id: Number; -} -export type Query_Id_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Query_Custom_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Number | Promise; - -export type Query_Custom_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Number | null | Promise; - -export type Query_Custom_array_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Number[] | null | Promise; - -export type Query_Custom_array_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Number[] | Promise; - -export type Query_Custom_with_arg_Resolver = ( - parent: {}, - args: Query_Args_Custom_with_arg, - ctx: Context, - info: GraphQLResolveInfo -) => Number | Promise; - -export type Query_Custom_with_custom_arg_Resolver = ( - parent: {}, - args: Query_Args_Custom_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo -) => Number | Promise; - -export type Query_Scalar_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Query_Scalar_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type Query_Scalar_array_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean[] | null | Promise; - -export type Query_Scalar_array_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean[] | Promise; - -export type Query_Scalar_with_arg_Resolver = ( - parent: {}, - args: Query_Args_Scalar_with_arg, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Query_Scalar_with_custom_arg_Resolver = ( - parent: {}, - args: Query_Args_Scalar_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export interface Query_Resolvers { - id: ( + + export interface Query_Args_Custom_with_arg { + id: number + } + + + export interface Query_Args_Custom_with_custom_arg { + id: Number + } + + + + + + + export interface Query_Args_Scalar_with_arg { + id: number + } + + + export interface Query_Args_Scalar_with_custom_arg { + id: Number + } + + + + export type Query_Id_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - custom_required: ( + export type Query_Custom_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - custom_nullable: ( + export type Query_Custom_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number | null | Promise; + info: GraphQLResolveInfo, + ) + => Number| null | Promise + - custom_array_nullable: ( + export type Query_Custom_array_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | null | Promise; + info: GraphQLResolveInfo, + ) + => Number[]| null | Promise + - custom_array_required: ( + export type Query_Custom_array_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | Promise; + info: GraphQLResolveInfo, + ) + => Number[] | Promise + - custom_with_arg: ( + export type Query_Custom_with_arg_Resolver = + ( parent: {}, args: Query_Args_Custom_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - custom_with_custom_arg: ( + export type Query_Custom_with_custom_arg_Resolver = + ( parent: {}, args: Query_Args_Custom_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - scalar_required: ( + export type Query_Scalar_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - scalar_nullable: ( + export type Query_Scalar_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - scalar_array_nullable: ( + export type Query_Scalar_array_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + - scalar_array_required: ( + export type Query_Scalar_array_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + - scalar_with_arg: ( + export type Query_Scalar_with_arg_Resolver = + ( parent: {}, args: Query_Args_Scalar_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - scalar_with_custom_arg: ( + export type Query_Scalar_with_custom_arg_Resolver = + ( parent: {}, args: Query_Args_Scalar_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; -} + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + + export interface Query_Resolvers { + + id: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -// Types for Number -export const Number_defaultResolvers = { - id: (parent: Number) => parent.id, - value: (parent: Number) => parent.value -}; + custom_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Number | Promise, + + + custom_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Number| null | Promise, + + + custom_array_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Number[]| null | Promise, + + + custom_array_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Number[] | Promise, + + + custom_with_arg: + ( + parent: {}, + args: Query_Args_Custom_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => Number | Promise, + + + custom_with_custom_arg: + ( + parent: {}, + args: Query_Args_Custom_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => Number | Promise, + + + scalar_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + scalar_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + + + scalar_array_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean[]| null | Promise, + + + scalar_array_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean[] | Promise, + -export type Number_Id_Resolver = ( - parent: Number, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export type Number_Value_Resolver = ( - parent: Number, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export interface Number_Resolvers { - id: ( + scalar_with_arg: + ( + parent: {}, + args: Query_Args_Scalar_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + scalar_with_custom_arg: + ( + parent: {}, + args: Query_Args_Scalar_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + } + + + + + // Types for Number + export const Number_defaultResolvers = { + id: (parent: Number) => parent.id, +value: (parent: Number) => parent.value, + } + + + + + + + + export type Number_Id_Resolver = + ( parent: Number, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - value: ( + export type Number_Value_Resolver = + ( parent: Number, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; -} + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + + export interface Number_Resolvers { + + id: + ( + parent: Number, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string| null | Promise, + + + value: + ( + parent: Number, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number| null | Promise, + + } + + + + + export interface Resolvers { - Query: Query_Resolvers; - Number: Number_Resolvers; + Query: Query_Resolvers, +Number: Number_Resolvers } -" + + + " `; exports[`basic schema 2`] = ` @@ -610,115 +812,175 @@ export const resolvers: Resolvers = { `; exports[`basic union 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { - User, - Student, - Professor -} from \\"../../../fixtures/union/flow-types\\"; -type Context = any; +import type { GraphQLResolveInfo } from 'graphql' +import type { User,Student,Professor } from '../../../fixtures/union/flow-types' +type Context = any + -// Types for User -export const User_defaultResolvers = { - id: (parent: User) => parent.id, - name: (parent: User) => parent.name -}; + -export type User_Id_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_Name_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_Type_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => {} | Promise<{}>; - -export interface User_Resolvers { - id: ( + // Types for User + export const User_defaultResolvers = { + id: (parent: User) => parent.id, +name: (parent: User) => parent.name, + } + + + + + + + + + export type User_Id_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - name: ( + export type User_Name_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - type: ( + export type User_Type_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => {} | Promise<{}>; -} + info: GraphQLResolveInfo, + ) + => {} | Promise<{}> + + + + export interface User_Resolvers { + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -// Types for Student -export const Student_defaultResolvers = { - age: (parent: Student) => parent.age -}; + name: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + type: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => {} | Promise<{}>, + + } + -export type Student_Age_Resolver = ( - parent: Student, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; + + + // Types for Student + export const Student_defaultResolvers = { + age: (parent: Student) => parent.age, + } -export interface Student_Resolvers { - age: ( + + + + + + export type Student_Age_Resolver = + ( parent: Student, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Student_Resolvers { + + age: + ( + parent: Student, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + } + -// Types for Professor -export const Professor_defaultResolvers = { - degree: (parent: Professor) => parent.degree -}; + + + // Types for Professor + export const Professor_defaultResolvers = { + degree: (parent: Professor) => parent.degree, + } -export type Professor_Degree_Resolver = ( - parent: Professor, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; + -export interface Professor_Resolvers { - degree: ( + + + + export type Professor_Degree_Resolver = + ( parent: Professor, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; -} + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + + export interface Professor_Resolvers { + + degree: + ( + parent: Professor, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string| null | Promise, + + } + + + + + export interface Resolvers { - User: User_Resolvers; - Student: Student_Resolvers; - Professor: Professor_Resolvers; + User: User_Resolvers, +Student: Student_Resolvers, +Professor: Professor_Resolvers } -" + + + " `; exports[`basic union 2`] = ` @@ -787,58 +1049,95 @@ export const resolvers: Resolvers = { `; exports[`context 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { User } from \\"../../../fixtures/context/flow-types\\"; -import type { Context } from \\"../../../fixtures/context/flow-types\\"; +import type { GraphQLResolveInfo } from 'graphql' +import type { User } from '../../../fixtures/context/flow-types' +import type { Context } from '../../../fixtures/context/flow-types' + + + + + // Types for Query + export const Query_defaultResolvers = {} -// Types for Query -export const Query_defaultResolvers = {}; + -export type Query_CreateUser_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | null | Promise; + -export interface Query_Resolvers { - createUser: ( + + export type Query_CreateUser_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | null | Promise; -} + info: GraphQLResolveInfo, + ) + => User| null | Promise + + + + export interface Query_Resolvers { + + createUser: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => User| null | Promise, + + } + -// Types for User -export const User_defaultResolvers = { - id: (parent: User) => parent.id -}; + + + // Types for User + export const User_defaultResolvers = { + id: (parent: User) => parent.id, + } -export type User_Id_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; + -export interface User_Resolvers { - id: ( + + + + export type User_Id_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface User_Resolvers { + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + export interface Resolvers { - Query: Query_Resolvers; - User: User_Resolvers; + Query: Query_Resolvers, +User: User_Resolvers } -" + + + " `; exports[`context 2`] = ` @@ -890,257 +1189,372 @@ export const resolvers: Resolvers = { `; exports[`defaultName 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { NumberNode } from \\"../../../fixtures/defaultName/flow-types\\"; -type Context = any; +import type { GraphQLResolveInfo } from 'graphql' +import type { NumberNode } from '../../../fixtures/defaultName/flow-types' +type Context = any + -// Types for Query -export const Query_defaultResolvers = {}; + -export interface Query_Args_Custom_with_arg { - id: number; -} + // Types for Query + export const Query_defaultResolvers = {} -export interface Query_Args_Custom_with_custom_arg { - id: NumberNode; -} + + + + + + + + + export interface Query_Args_Custom_with_arg { + id: number + } + + + export interface Query_Args_Custom_with_custom_arg { + id: NumberNode + } + -export interface Query_Args_Scalar_with_arg { - id: number; -} -export interface Query_Args_Scalar_with_custom_arg { - id: NumberNode; -} -export type Query_Id_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Query_Custom_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => NumberNode | Promise; - -export type Query_Custom_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => NumberNode | null | Promise; - -export type Query_Custom_array_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => NumberNode[] | null | Promise; - -export type Query_Custom_array_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => NumberNode[] | Promise; - -export type Query_Custom_with_arg_Resolver = ( - parent: {}, - args: Query_Args_Custom_with_arg, - ctx: Context, - info: GraphQLResolveInfo -) => NumberNode | Promise; - -export type Query_Custom_with_custom_arg_Resolver = ( - parent: {}, - args: Query_Args_Custom_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo -) => NumberNode | Promise; - -export type Query_Scalar_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Query_Scalar_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type Query_Scalar_array_nullable_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean[] | null | Promise; - -export type Query_Scalar_array_required_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean[] | Promise; - -export type Query_Scalar_with_arg_Resolver = ( - parent: {}, - args: Query_Args_Scalar_with_arg, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Query_Scalar_with_custom_arg_Resolver = ( - parent: {}, - args: Query_Args_Scalar_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export interface Query_Resolvers { - id: ( + + + export interface Query_Args_Scalar_with_arg { + id: number + } + + + export interface Query_Args_Scalar_with_custom_arg { + id: NumberNode + } + + + + export type Query_Id_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - custom_required: ( + export type Query_Custom_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + - custom_nullable: ( + export type Query_Custom_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | null | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode| null | Promise + - custom_array_nullable: ( + export type Query_Custom_array_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode[] | null | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode[]| null | Promise + - custom_array_required: ( + export type Query_Custom_array_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode[] | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode[] | Promise + - custom_with_arg: ( + export type Query_Custom_with_arg_Resolver = + ( parent: {}, args: Query_Args_Custom_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + - custom_with_custom_arg: ( + export type Query_Custom_with_custom_arg_Resolver = + ( parent: {}, args: Query_Args_Custom_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + - scalar_required: ( + export type Query_Scalar_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - scalar_nullable: ( + export type Query_Scalar_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - scalar_array_nullable: ( + export type Query_Scalar_array_nullable_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + - scalar_array_required: ( + export type Query_Scalar_array_required_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + - scalar_with_arg: ( + export type Query_Scalar_with_arg_Resolver = + ( parent: {}, args: Query_Args_Scalar_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - scalar_with_custom_arg: ( + export type Query_Scalar_with_custom_arg_Resolver = + ( parent: {}, args: Query_Args_Scalar_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; -} + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + + export interface Query_Resolvers { + + id: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -// Types for Number -export const Number_defaultResolvers = { - id: (parent: NumberNode) => parent.id, - value: (parent: NumberNode) => parent.value -}; + custom_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => NumberNode | Promise, + + + custom_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => NumberNode| null | Promise, + + + custom_array_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => NumberNode[]| null | Promise, + + + custom_array_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => NumberNode[] | Promise, + + + custom_with_arg: + ( + parent: {}, + args: Query_Args_Custom_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => NumberNode | Promise, + + + custom_with_custom_arg: + ( + parent: {}, + args: Query_Args_Custom_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => NumberNode | Promise, + + + scalar_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + scalar_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + + + scalar_array_nullable: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean[]| null | Promise, + + + scalar_array_required: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean[] | Promise, + + + scalar_with_arg: + ( + parent: {}, + args: Query_Args_Scalar_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + scalar_with_custom_arg: + ( + parent: {}, + args: Query_Args_Scalar_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + } + + + + + // Types for Number + export const Number_defaultResolvers = { + id: (parent: NumberNode) => parent.id, +value: (parent: NumberNode) => parent.value, + } + + + + -export type Number_Id_Resolver = ( - parent: NumberNode, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export type Number_Value_Resolver = ( - parent: NumberNode, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export interface Number_Resolvers { - id: ( + + + export type Number_Id_Resolver = + ( parent: NumberNode, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - value: ( + export type Number_Value_Resolver = + ( parent: NumberNode, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; -} + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + + export interface Number_Resolvers { + + id: + ( + parent: NumberNode, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string| null | Promise, + + value: + ( + parent: NumberNode, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number| null | Promise, + + } + + + + + + export interface Resolvers { - Query: Query_Resolvers; - Number: Number_Resolvers; + Query: Query_Resolvers, +Number: Number_Resolvers } -" + + + " `; exports[`defaultName 2`] = ` @@ -1228,74 +1642,114 @@ export const resolvers: Resolvers = { `; exports[`subscription 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { User } from \\"../../../fixtures/subscription/flow-types\\"; -type Context = any; +import type { GraphQLResolveInfo } from 'graphql' +import type { User } from '../../../fixtures/subscription/flow-types' +type Context = any + + + + + // Types for Subscription + export const Subscription_defaultResolvers = {} -// Types for Subscription -export const Subscription_defaultResolvers = {}; + -export type Subscription_SubscribeToUser_Resolver = {| - subscribe: ( + + + + export type Subscription_SubscribeToUser_Resolver = {| + subscribe: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AsyncIterator | Promise>, + resolve?: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + |} + + + + export interface Subscription_Resolvers { + + subscribeToUser: {| + subscribe: + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo + info: GraphQLResolveInfo, ) => AsyncIterator | Promise>, - resolve?: ( + resolve?: + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo + info: GraphQLResolveInfo, ) => User | Promise -|}; - -export interface Subscription_Resolvers { - subscribeToUser: {| - subscribe: ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => AsyncIterator | Promise>, - resolve?: ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise - |}; -} + |} + + } + -// Types for User -export const User_defaultResolvers = { - name: (parent: User) => parent.name -}; + + + // Types for User + export const User_defaultResolvers = { + name: (parent: User) => parent.name, + } + + -export type User_Name_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; + -export interface User_Resolvers { - name: ( + + export type User_Name_Resolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface User_Resolvers { + + name: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + export interface Resolvers { - Subscription: Subscription_Resolvers; - User: User_Resolvers; + Subscription: Subscription_Resolvers, +User: User_Resolvers } -" + + + " `; exports[`subscription 2`] = ` diff --git a/packages/graphqlgen/src/tests/flow/__snapshots__/large-schema.test.ts.snap b/packages/graphqlgen/src/tests/flow/__snapshots__/large-schema.test.ts.snap index 58d2d337..c7026aa1 100644 --- a/packages/graphqlgen/src/tests/flow/__snapshots__/large-schema.test.ts.snap +++ b/packages/graphqlgen/src/tests/flow/__snapshots__/large-schema.test.ts.snap @@ -1,3833 +1,5426 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`large schema 1`] = ` -"/* @flow */ +" /* @flow */ // Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import type { GraphQLResolveInfo } from \\"graphql\\"; -import type { - Experience, - ExperienceCategory, - Location, - Review, - Picture, - Home, - Reservation, - Neighbourhood, - City, - ExperiencesByCity, - Viewer, - User, - Booking, - Place, - Amenities, - Pricing, - PlaceViews, - GuestRequirements, - Policies, - HouseRules, - Payment, - PaymentAccount, - PaypalInformation, - CreditCardInformation, - Notification, - Message, - AuthPayload, - MutationResult -} from \\"../../../fixtures/prisma/flow-types\\"; -type Context = any; - -type PLACE_SIZES = - | \\"ENTIRE_HOUSE\\" - | \\"ENTIRE_APARTMENT\\" - | \\"ENTIRE_EARTH_HOUSE\\" - | \\"ENTIRE_CABIN\\" - | \\"ENTIRE_VILLA\\" - | \\"ENTIRE_PLACE\\" - | \\"ENTIRE_BOAT\\" - | \\"PRIVATE_ROOM\\"; -type CURRENCY = \\"CAD\\" | \\"CHF\\" | \\"EUR\\" | \\"JPY\\" | \\"USD\\" | \\"ZAR\\"; -type PAYMENT_PROVIDER = \\"PAYPAL\\" | \\"CREDIT_CARD\\"; -type NOTIFICATION_TYPE = - | \\"OFFER\\" - | \\"INSTANT_BOOK\\" - | \\"RESPONSIVENESS\\" - | \\"NEW_AMENITIES\\" - | \\"HOUSE_RULES\\"; - -// Types for Query -export const Query_defaultResolvers = {}; - -export interface Query_Args_HomesInPriceRange { - min: number; - max: number; -} +import type { GraphQLResolveInfo } from 'graphql' +import type { Experience,ExperienceCategory,Location,Review,Picture,Home,Reservation,Neighbourhood,City,ExperiencesByCity,Viewer,User,Booking,Place,Amenities,Pricing,PlaceViews,GuestRequirements,Policies,HouseRules,Payment,PaymentAccount,PaypalInformation,CreditCardInformation,Notification,Message,AuthPayload,MutationResult } from '../../../fixtures/prisma/flow-types' +type Context = any + -export interface Query_Args_ExperiencesByCity { - cities: string[]; -} + type PLACE_SIZES = 'ENTIRE_HOUSE' | 'ENTIRE_APARTMENT' | 'ENTIRE_EARTH_HOUSE' | 'ENTIRE_CABIN' | 'ENTIRE_VILLA' | 'ENTIRE_PLACE' | 'ENTIRE_BOAT' | 'PRIVATE_ROOM' +type CURRENCY = 'CAD' | 'CHF' | 'EUR' | 'JPY' | 'USD' | 'ZAR' +type PAYMENT_PROVIDER = 'PAYPAL' | 'CREDIT_CARD' +type NOTIFICATION_TYPE = 'OFFER' | 'INSTANT_BOOK' | 'RESPONSIVENESS' | 'NEW_AMENITIES' | 'HOUSE_RULES' + + // Types for Query + export const Query_defaultResolvers = {} + + -export type Query_TopExperiences_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Experience[] | Promise; - -export type Query_TopHomes_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Home[] | Promise; - -export type Query_HomesInPriceRange_Resolver = ( - parent: {}, - args: Query_Args_HomesInPriceRange, - ctx: Context, - info: GraphQLResolveInfo -) => Home[] | Promise; - -export type Query_TopReservations_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Reservation[] | Promise; - -export type Query_FeaturedDestinations_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Neighbourhood[] | Promise; - -export type Query_ExperiencesByCity_Resolver = ( - parent: {}, - args: Query_Args_ExperiencesByCity, - ctx: Context, - info: GraphQLResolveInfo -) => ExperiencesByCity[] | Promise; - -export type Query_Viewer_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Viewer | null | Promise; - -export type Query_MyLocation_Resolver = ( - parent: {}, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Location | null | Promise; - -export interface Query_Resolvers { - topExperiences: ( + + + + export interface Query_Args_HomesInPriceRange { + min: number, +max: number + } + + + + + export interface Query_Args_ExperiencesByCity { + cities: string[] + } + + + + + + export type Query_TopExperiences_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + - topHomes: ( + export type Query_TopHomes_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Home[] | Promise; + info: GraphQLResolveInfo, + ) + => Home[] | Promise + - homesInPriceRange: ( + export type Query_HomesInPriceRange_Resolver = + ( parent: {}, args: Query_Args_HomesInPriceRange, ctx: Context, - info: GraphQLResolveInfo - ) => Home[] | Promise; + info: GraphQLResolveInfo, + ) + => Home[] | Promise + - topReservations: ( + export type Query_TopReservations_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Reservation[] | Promise; + info: GraphQLResolveInfo, + ) + => Reservation[] | Promise + - featuredDestinations: ( + export type Query_FeaturedDestinations_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Neighbourhood[] | Promise; + info: GraphQLResolveInfo, + ) + => Neighbourhood[] | Promise + - experiencesByCity: ( + export type Query_ExperiencesByCity_Resolver = + ( parent: {}, args: Query_Args_ExperiencesByCity, ctx: Context, - info: GraphQLResolveInfo - ) => ExperiencesByCity[] | Promise; + info: GraphQLResolveInfo, + ) + => ExperiencesByCity[] | Promise + - viewer: ( + export type Query_Viewer_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Viewer | null | Promise; + info: GraphQLResolveInfo, + ) + => Viewer| null | Promise + - myLocation: ( + export type Query_MyLocation_Resolver = + ( parent: {}, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | null | Promise; -} + info: GraphQLResolveInfo, + ) + => Location| null | Promise + + + + export interface Query_Resolvers { + + topExperiences: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Experience[] | Promise, + + + topHomes: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Home[] | Promise, + + + homesInPriceRange: + ( + parent: {}, + args: Query_Args_HomesInPriceRange, + ctx: Context, + info: GraphQLResolveInfo, + ) => Home[] | Promise, + + + topReservations: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Reservation[] | Promise, + + + featuredDestinations: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Neighbourhood[] | Promise, + + + experiencesByCity: + ( + parent: {}, + args: Query_Args_ExperiencesByCity, + ctx: Context, + info: GraphQLResolveInfo, + ) => ExperiencesByCity[] | Promise, + + + viewer: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Viewer| null | Promise, + + + myLocation: + ( + parent: {}, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Location| null | Promise, + + } + + + + + // Types for Experience + export const Experience_defaultResolvers = { + id: (parent: Experience) => parent.id, +category: (parent: Experience) => parent.category === undefined ? null : parent.category, +title: (parent: Experience) => parent.title, +location: (parent: Experience) => parent.location, +pricePerPerson: (parent: Experience) => parent.pricePerPerson, +reviews: (parent: Experience) => parent.reviews, +preview: (parent: Experience) => parent.preview, +popularity: (parent: Experience) => parent.popularity, + } + + + + -// Types for Experience -export const Experience_defaultResolvers = { - id: (parent: Experience) => parent.id, - category: (parent: Experience) => - parent.category === undefined ? null : parent.category, - title: (parent: Experience) => parent.title, - location: (parent: Experience) => parent.location, - pricePerPerson: (parent: Experience) => parent.pricePerPerson, - reviews: (parent: Experience) => parent.reviews, - preview: (parent: Experience) => parent.preview, - popularity: (parent: Experience) => parent.popularity -}; -export type Experience_Id_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Experience_Category_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => ExperienceCategory | null | Promise; - -export type Experience_Title_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Experience_Location_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Location | Promise; - -export type Experience_PricePerPerson_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Experience_Reviews_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Review[] | Promise; - -export type Experience_Preview_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Picture | Promise; - -export type Experience_Popularity_Resolver = ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Experience_Resolvers { - id: ( + + + + + + + + export type Experience_Id_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - category: ( + export type Experience_Category_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => ExperienceCategory | null | Promise; + info: GraphQLResolveInfo, + ) + => ExperienceCategory| null | Promise + - title: ( + export type Experience_Title_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - location: ( + export type Experience_Location_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) + => Location | Promise + - pricePerPerson: ( + export type Experience_PricePerPerson_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - reviews: ( + export type Experience_Reviews_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Review[] | Promise; + info: GraphQLResolveInfo, + ) + => Review[] | Promise + - preview: ( + export type Experience_Preview_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture | Promise; + info: GraphQLResolveInfo, + ) + => Picture | Promise + - popularity: ( + export type Experience_Popularity_Resolver = + ( parent: Experience, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Experience_Resolvers { + + id: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + category: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => ExperienceCategory| null | Promise, + + + title: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + location: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Location | Promise, + + + pricePerPerson: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + reviews: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Review[] | Promise, + + + preview: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Picture | Promise, + + + popularity: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for ExperienceCategory + export const ExperienceCategory_defaultResolvers = { + id: (parent: ExperienceCategory) => parent.id, +mainColor: (parent: ExperienceCategory) => parent.mainColor, +name: (parent: ExperienceCategory) => parent.name, +experience: (parent: ExperienceCategory) => parent.experience === undefined ? null : parent.experience, + } + + + + -// Types for ExperienceCategory -export const ExperienceCategory_defaultResolvers = { - id: (parent: ExperienceCategory) => parent.id, - mainColor: (parent: ExperienceCategory) => parent.mainColor, - name: (parent: ExperienceCategory) => parent.name, - experience: (parent: ExperienceCategory) => - parent.experience === undefined ? null : parent.experience -}; -export type ExperienceCategory_Id_Resolver = ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type ExperienceCategory_MainColor_Resolver = ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type ExperienceCategory_Name_Resolver = ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type ExperienceCategory_Experience_Resolver = ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Experience | null | Promise; - -export interface ExperienceCategory_Resolvers { - id: ( + + + + export type ExperienceCategory_Id_Resolver = + ( parent: ExperienceCategory, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - mainColor: ( + export type ExperienceCategory_MainColor_Resolver = + ( parent: ExperienceCategory, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - name: ( + export type ExperienceCategory_Name_Resolver = + ( parent: ExperienceCategory, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - experience: ( + export type ExperienceCategory_Experience_Resolver = + ( parent: ExperienceCategory, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience | null | Promise; -} + info: GraphQLResolveInfo, + ) + => Experience| null | Promise + + + + export interface ExperienceCategory_Resolvers { + + id: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + mainColor: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + name: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + experience: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Experience| null | Promise, + + } + + + + + // Types for Location + export const Location_defaultResolvers = { + id: (parent: Location) => parent.id, +lat: (parent: Location) => parent.lat, +lng: (parent: Location) => parent.lng, +address: (parent: Location) => parent.address === undefined ? null : parent.address, +directions: (parent: Location) => parent.directions === undefined ? null : parent.directions, + } + + + + -// Types for Location -export const Location_defaultResolvers = { - id: (parent: Location) => parent.id, - lat: (parent: Location) => parent.lat, - lng: (parent: Location) => parent.lng, - address: (parent: Location) => - parent.address === undefined ? null : parent.address, - directions: (parent: Location) => - parent.directions === undefined ? null : parent.directions -}; -export type Location_Id_Resolver = ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Location_Lat_Resolver = ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Location_Lng_Resolver = ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Location_Address_Resolver = ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export type Location_Directions_Resolver = ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export interface Location_Resolvers { - id: ( + + + + + export type Location_Id_Resolver = + ( parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - lat: ( + export type Location_Lat_Resolver = + ( parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - lng: ( + export type Location_Lng_Resolver = + ( parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - address: ( + export type Location_Address_Resolver = + ( parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - directions: ( + export type Location_Directions_Resolver = + ( parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; -} + info: GraphQLResolveInfo, + ) + => string| null | Promise + -// Types for Review -export const Review_defaultResolvers = { - accuracy: (parent: Review) => parent.accuracy, - checkIn: (parent: Review) => parent.checkIn, - cleanliness: (parent: Review) => parent.cleanliness, - communication: (parent: Review) => parent.communication, - createdAt: (parent: Review) => parent.createdAt, - id: (parent: Review) => parent.id, - location: (parent: Review) => parent.location, - stars: (parent: Review) => parent.stars, - text: (parent: Review) => parent.text, - value: (parent: Review) => parent.value -}; + + export interface Location_Resolvers { + + id: + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -export type Review_Accuracy_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Review_CheckIn_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Review_Cleanliness_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Review_Communication_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Review_CreatedAt_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Review_Id_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Review_Location_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Review_Stars_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Review_Text_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Review_Value_Resolver = ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Review_Resolvers { - accuracy: ( - parent: Review, + lat: + ( + parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - checkIn: ( - parent: Review, + lng: + ( + parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - cleanliness: ( - parent: Review, + address: + ( + parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => string| null | Promise, + - communication: ( - parent: Review, + directions: + ( + parent: Location, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => string| null | Promise, + + } + + + + + // Types for Review + export const Review_defaultResolvers = { + accuracy: (parent: Review) => parent.accuracy, +checkIn: (parent: Review) => parent.checkIn, +cleanliness: (parent: Review) => parent.cleanliness, +communication: (parent: Review) => parent.communication, +createdAt: (parent: Review) => parent.createdAt, +id: (parent: Review) => parent.id, +location: (parent: Review) => parent.location, +stars: (parent: Review) => parent.stars, +text: (parent: Review) => parent.text, +value: (parent: Review) => parent.value, + } + + + + + + + + + + + + - createdAt: ( + + + export type Review_Accuracy_Resolver = + ( parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - id: ( + export type Review_CheckIn_Resolver = + ( parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - location: ( + export type Review_Cleanliness_Resolver = + ( parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - stars: ( + export type Review_Communication_Resolver = + ( parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - text: ( + export type Review_CreatedAt_Resolver = + ( parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - value: ( + export type Review_Id_Resolver = + ( parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} - -// Types for Picture -export const Picture_defaultResolvers = { - id: (parent: Picture) => parent.id, - url: (parent: Picture) => parent.url -}; + info: GraphQLResolveInfo, + ) + => string | Promise + -export type Picture_Id_Resolver = ( - parent: Picture, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Picture_Url_Resolver = ( - parent: Picture, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface Picture_Resolvers { - id: ( - parent: Picture, + export type Review_Location_Resolver = + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - url: ( - parent: Picture, + export type Review_Stars_Resolver = + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} - -// Types for Home -export const Home_defaultResolvers = { - id: (parent: Home) => parent.id, - name: (parent: Home) => (parent.name === undefined ? null : parent.name), - description: (parent: Home) => parent.description, - numRatings: (parent: Home) => parent.numRatings, - avgRating: (parent: Home) => - parent.avgRating === undefined ? null : parent.avgRating, - pictures: (parent: Home) => parent.pictures, - perNight: (parent: Home) => parent.perNight -}; - -export interface Home_Args_Pictures { - first: number | null; -} + info: GraphQLResolveInfo, + ) + => number | Promise + -export type Home_Id_Resolver = ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Home_Name_Resolver = ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export type Home_Description_Resolver = ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Home_NumRatings_Resolver = ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Home_AvgRating_Resolver = ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type Home_Pictures_Resolver = ( - parent: Home, - args: Home_Args_Pictures, - ctx: Context, - info: GraphQLResolveInfo -) => Picture[] | Promise; - -export type Home_PerNight_Resolver = ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Home_Resolvers { - id: ( - parent: Home, + export type Review_Text_Resolver = + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - name: ( - parent: Home, + export type Review_Value_Resolver = + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - description: ( - parent: Home, + + export interface Review_Resolvers { + + accuracy: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - numRatings: ( - parent: Home, + checkIn: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - avgRating: ( - parent: Home, + cleanliness: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - pictures: ( - parent: Home, - args: Home_Args_Pictures, + communication: + ( + parent: Review, + args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - perNight: ( - parent: Home, + createdAt: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} - -// Types for Reservation -export const Reservation_defaultResolvers = { - id: (parent: Reservation) => parent.id, - title: (parent: Reservation) => parent.title, - avgPricePerPerson: (parent: Reservation) => parent.avgPricePerPerson, - pictures: (parent: Reservation) => parent.pictures, - location: (parent: Reservation) => parent.location, - isCurated: (parent: Reservation) => parent.isCurated, - slug: (parent: Reservation) => parent.slug, - popularity: (parent: Reservation) => parent.popularity -}; + info: GraphQLResolveInfo, + ) => string | Promise, + -export type Reservation_Id_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Reservation_Title_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Reservation_AvgPricePerPerson_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Reservation_Pictures_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Picture[] | Promise; - -export type Reservation_Location_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Location | Promise; - -export type Reservation_IsCurated_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Reservation_Slug_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Reservation_Popularity_Resolver = ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Reservation_Resolvers { - id: ( - parent: Reservation, + id: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - title: ( - parent: Reservation, + location: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - avgPricePerPerson: ( - parent: Reservation, + stars: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - pictures: ( - parent: Reservation, + text: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - location: ( - parent: Reservation, + value: + ( + parent: Review, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for Picture + export const Picture_defaultResolvers = { + id: (parent: Picture) => parent.id, +url: (parent: Picture) => parent.url, + } - isCurated: ( - parent: Reservation, + + + + + + + export type Picture_Id_Resolver = + ( + parent: Picture, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - slug: ( - parent: Reservation, + export type Picture_Url_Resolver = + ( + parent: Picture, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - popularity: ( - parent: Reservation, + + export interface Picture_Resolvers { + + id: + ( + parent: Picture, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} - -// Types for Neighbourhood -export const Neighbourhood_defaultResolvers = { - id: (parent: Neighbourhood) => parent.id, - name: (parent: Neighbourhood) => parent.name, - slug: (parent: Neighbourhood) => parent.slug, - homePreview: (parent: Neighbourhood) => - parent.homePreview === undefined ? null : parent.homePreview, - city: (parent: Neighbourhood) => parent.city, - featured: (parent: Neighbourhood) => parent.featured, - popularity: (parent: Neighbourhood) => parent.popularity -}; + info: GraphQLResolveInfo, + ) => string | Promise, + -export type Neighbourhood_Id_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Neighbourhood_Name_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Neighbourhood_Slug_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Neighbourhood_HomePreview_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Picture | null | Promise; - -export type Neighbourhood_City_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => City | Promise; - -export type Neighbourhood_Featured_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Neighbourhood_Popularity_Resolver = ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Neighbourhood_Resolvers { - id: ( - parent: Neighbourhood, + url: + ( + parent: Picture, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for Home + export const Home_defaultResolvers = { + id: (parent: Home) => parent.id, +name: (parent: Home) => parent.name === undefined ? null : parent.name, +description: (parent: Home) => parent.description, +numRatings: (parent: Home) => parent.numRatings, +avgRating: (parent: Home) => parent.avgRating === undefined ? null : parent.avgRating, +pictures: (parent: Home) => parent.pictures, +perNight: (parent: Home) => parent.perNight, + } - name: ( - parent: Neighbourhood, + + + + + + + + + export interface Home_Args_Pictures { + first: number| null + } + + + + + export type Home_Id_Resolver = + ( + parent: Home, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - slug: ( - parent: Neighbourhood, + export type Home_Name_Resolver = + ( + parent: Home, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - homePreview: ( - parent: Neighbourhood, + export type Home_Description_Resolver = + ( + parent: Home, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - city: ( - parent: Neighbourhood, + export type Home_NumRatings_Resolver = + ( + parent: Home, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => City | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - featured: ( - parent: Neighbourhood, + export type Home_AvgRating_Resolver = + ( + parent: Home, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - popularity: ( - parent: Neighbourhood, + export type Home_Pictures_Resolver = + ( + parent: Home, + args: Home_Args_Pictures, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + export type Home_PerNight_Resolver = + ( + parent: Home, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Home_Resolvers { + + id: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + name: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string| null | Promise, + + + description: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + numRatings: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + avgRating: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number| null | Promise, + + + pictures: + ( + parent: Home, + args: Home_Args_Pictures, + ctx: Context, + info: GraphQLResolveInfo, + ) => Picture[] | Promise, + + + perNight: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for Reservation + export const Reservation_defaultResolvers = { + id: (parent: Reservation) => parent.id, +title: (parent: Reservation) => parent.title, +avgPricePerPerson: (parent: Reservation) => parent.avgPricePerPerson, +pictures: (parent: Reservation) => parent.pictures, +location: (parent: Reservation) => parent.location, +isCurated: (parent: Reservation) => parent.isCurated, +slug: (parent: Reservation) => parent.slug, +popularity: (parent: Reservation) => parent.popularity, + } + + + + + + + + + + + + + + export type Reservation_Id_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Reservation_Title_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Reservation_AvgPricePerPerson_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type Reservation_Pictures_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + export type Reservation_Location_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type Reservation_IsCurated_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Reservation_Slug_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Reservation_Popularity_Resolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Reservation_Resolvers { + + id: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + title: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + avgPricePerPerson: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + pictures: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Picture[] | Promise, + + + location: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Location | Promise, + + + isCurated: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + slug: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + popularity: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for Neighbourhood + export const Neighbourhood_defaultResolvers = { + id: (parent: Neighbourhood) => parent.id, +name: (parent: Neighbourhood) => parent.name, +slug: (parent: Neighbourhood) => parent.slug, +homePreview: (parent: Neighbourhood) => parent.homePreview === undefined ? null : parent.homePreview, +city: (parent: Neighbourhood) => parent.city, +featured: (parent: Neighbourhood) => parent.featured, +popularity: (parent: Neighbourhood) => parent.popularity, + } + + + + + + + + + + + + + export type Neighbourhood_Id_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Neighbourhood_Name_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Neighbourhood_Slug_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Neighbourhood_HomePreview_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture| null | Promise + + + export type Neighbourhood_City_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => City | Promise + + + export type Neighbourhood_Featured_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Neighbourhood_Popularity_Resolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Neighbourhood_Resolvers { + + id: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + name: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + slug: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + homePreview: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Picture| null | Promise, + + + city: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => City | Promise, + + + featured: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + popularity: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for City + export const City_defaultResolvers = { + id: (parent: City) => parent.id, +name: (parent: City) => parent.name, + } + + + + -// Types for City -export const City_defaultResolvers = { - id: (parent: City) => parent.id, - name: (parent: City) => parent.name -}; -export type City_Id_Resolver = ( - parent: City, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type City_Name_Resolver = ( - parent: City, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface City_Resolvers { - id: ( + + export type City_Id_Resolver = + ( parent: City, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - name: ( + export type City_Name_Resolver = + ( parent: City, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) + => string | Promise + -// Types for ExperiencesByCity -export const ExperiencesByCity_defaultResolvers = { - experiences: (parent: ExperiencesByCity) => parent.experiences, - city: (parent: ExperiencesByCity) => parent.city -}; + + export interface City_Resolvers { + + id: + ( + parent: City, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + name: + ( + parent: City, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for ExperiencesByCity + export const ExperiencesByCity_defaultResolvers = { + experiences: (parent: ExperiencesByCity) => parent.experiences, +city: (parent: ExperiencesByCity) => parent.city, + } + + -export type ExperiencesByCity_Experiences_Resolver = ( - parent: ExperiencesByCity, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Experience[] | Promise; - -export type ExperiencesByCity_City_Resolver = ( - parent: ExperiencesByCity, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => City | Promise; - -export interface ExperiencesByCity_Resolvers { - experiences: ( + + + + + export type ExperiencesByCity_Experiences_Resolver = + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + export type ExperiencesByCity_City_Resolver = + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => City | Promise + + + + export interface ExperiencesByCity_Resolvers { + + experiences: + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Experience[] | Promise, + + + city: + ( parent: ExperiencesByCity, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; + info: GraphQLResolveInfo, + ) => City | Promise, + + } + + + + + // Types for Viewer + export const Viewer_defaultResolvers = { + me: (parent: Viewer) => parent.me, +bookings: (parent: Viewer) => parent.bookings, + } + + + + + + + + export type Viewer_Me_Resolver = + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + export type Viewer_Bookings_Resolver = + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + + export interface Viewer_Resolvers { + + me: + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => User | Promise, + + + bookings: + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Booking[] | Promise, + + } + + + + + // Types for User + export const User_defaultResolvers = { + bookings: (parent: User) => parent.bookings, +createdAt: (parent: User) => parent.createdAt, +email: (parent: User) => parent.email, +firstName: (parent: User) => parent.firstName, +hostingExperiences: (parent: User) => parent.hostingExperiences, +id: (parent: User) => parent.id, +isSuperHost: (parent: User) => parent.isSuperHost, +lastName: (parent: User) => parent.lastName, +notifications: (parent: User) => parent.notifications, +ownedPlaces: (parent: User) => parent.ownedPlaces, +phone: (parent: User) => parent.phone, +profilePicture: (parent: User) => parent.profilePicture === undefined ? null : parent.profilePicture, +receivedMessages: (parent: User) => parent.receivedMessages, +responseRate: (parent: User) => parent.responseRate === undefined ? null : parent.responseRate, +responseTime: (parent: User) => parent.responseTime === undefined ? null : parent.responseTime, +sentMessages: (parent: User) => parent.sentMessages, +updatedAt: (parent: User) => parent.updatedAt, + } + + + + + + + + + + + + + + + + + + + + + + + + + + export type User_Bookings_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + export type User_CreatedAt_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_Email_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_FirstName_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_HostingExperiences_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + export type User_Id_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_IsSuperHost_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type User_LastName_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_Location_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type User_Notifications_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Notification[] | Promise + + + export type User_OwnedPlaces_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Place[] | Promise + + + export type User_PaymentAccount_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PaymentAccount[] | Promise + + + export type User_Phone_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_ProfilePicture_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture| null | Promise + + + export type User_ReceivedMessages_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Message[] | Promise + + + export type User_ResponseRate_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + export type User_ResponseTime_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + export type User_SentMessages_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Message[] | Promise + + + export type User_UpdatedAt_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type User_Token_Resolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface User_Resolvers { + + bookings: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Booking[] | Promise, + + + createdAt: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + email: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + firstName: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + hostingExperiences: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Experience[] | Promise, + + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + isSuperHost: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + lastName: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + location: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Location | Promise, + + + notifications: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Notification[] | Promise, + + + ownedPlaces: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Place[] | Promise, + + + paymentAccount: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => PaymentAccount[] | Promise, + + + phone: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + profilePicture: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Picture| null | Promise, + + + receivedMessages: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Message[] | Promise, + + + responseRate: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number| null | Promise, + + + responseTime: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number| null | Promise, + + + sentMessages: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Message[] | Promise, + + + updatedAt: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + token: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for Booking + export const Booking_defaultResolvers = { + id: (parent: Booking) => parent.id, +createdAt: (parent: Booking) => parent.createdAt, +bookee: (parent: Booking) => parent.bookee, +place: (parent: Booking) => parent.place, +startDate: (parent: Booking) => parent.startDate, +endDate: (parent: Booking) => parent.endDate, +payment: (parent: Booking) => parent.payment, + } + + + + + + + + + + + + + export type Booking_Id_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Booking_CreatedAt_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Booking_Bookee_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + export type Booking_Place_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Place | Promise + + + export type Booking_StartDate_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Booking_EndDate_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Booking_Payment_Resolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Payment | Promise + + + + export interface Booking_Resolvers { + + id: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + createdAt: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + bookee: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => User | Promise, + + + place: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Place | Promise, + + + startDate: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + endDate: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + payment: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Payment | Promise, + + } + + + + + // Types for Place + export const Place_defaultResolvers = { + id: (parent: Place) => parent.id, +name: (parent: Place) => parent.name === undefined ? null : parent.name, +size: (parent: Place) => parent.size === undefined ? null : parent.size, +shortDescription: (parent: Place) => parent.shortDescription, +description: (parent: Place) => parent.description, +slug: (parent: Place) => parent.slug, +maxGuests: (parent: Place) => parent.maxGuests, +numBedrooms: (parent: Place) => parent.numBedrooms, +numBeds: (parent: Place) => parent.numBeds, +numBaths: (parent: Place) => parent.numBaths, +reviews: (parent: Place) => parent.reviews, +amenities: (parent: Place) => parent.amenities, +host: (parent: Place) => parent.host, +pricing: (parent: Place) => parent.pricing, +location: (parent: Place) => parent.location, +views: (parent: Place) => parent.views, +guestRequirements: (parent: Place) => parent.guestRequirements === undefined ? null : parent.guestRequirements, +policies: (parent: Place) => parent.policies === undefined ? null : parent.policies, +houseRules: (parent: Place) => parent.houseRules === undefined ? null : parent.houseRules, +bookings: (parent: Place) => parent.bookings, +pictures: (parent: Place) => parent.pictures, +popularity: (parent: Place) => parent.popularity, + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + export type Place_Id_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Place_Name_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + export type Place_Size_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PLACE_SIZES| null | Promise + + + export type Place_ShortDescription_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Place_Description_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Place_Slug_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Place_MaxGuests_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type Place_NumBedrooms_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type Place_NumBeds_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type Place_NumBaths_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type Place_Reviews_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Review[] | Promise + + + export type Place_Amenities_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Amenities | Promise + + + export type Place_Host_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + export type Place_Pricing_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Pricing | Promise + + + export type Place_Location_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type Place_Views_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PlaceViews | Promise + + + export type Place_GuestRequirements_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => GuestRequirements| null | Promise + + + export type Place_Policies_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Policies| null | Promise + + + export type Place_HouseRules_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => HouseRules| null | Promise + + + export type Place_Bookings_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + export type Place_Pictures_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + export type Place_Popularity_Resolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Place_Resolvers { + + id: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + name: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string| null | Promise, + + + size: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => PLACE_SIZES| null | Promise, + + + shortDescription: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + description: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + slug: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + + maxGuests: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + numBedrooms: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + numBeds: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + numBaths: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + + reviews: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Review[] | Promise, + + + amenities: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Amenities | Promise, + + + host: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => User | Promise, + + + pricing: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Pricing | Promise, + + + location: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Location | Promise, + + + views: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => PlaceViews | Promise, + + + guestRequirements: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => GuestRequirements| null | Promise, + + + policies: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Policies| null | Promise, + + + houseRules: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => HouseRules| null | Promise, + + + bookings: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Booking[] | Promise, + + + pictures: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => Picture[] | Promise, + + + popularity: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for Amenities + export const Amenities_defaultResolvers = { + airConditioning: (parent: Amenities) => parent.airConditioning, +babyBath: (parent: Amenities) => parent.babyBath, +babyMonitor: (parent: Amenities) => parent.babyMonitor, +babysitterRecommendations: (parent: Amenities) => parent.babysitterRecommendations, +bathtub: (parent: Amenities) => parent.bathtub, +breakfast: (parent: Amenities) => parent.breakfast, +buzzerWirelessIntercom: (parent: Amenities) => parent.buzzerWirelessIntercom, +cableTv: (parent: Amenities) => parent.cableTv, +changingTable: (parent: Amenities) => parent.changingTable, +childrensBooksAndToys: (parent: Amenities) => parent.childrensBooksAndToys, +childrensDinnerware: (parent: Amenities) => parent.childrensDinnerware, +crib: (parent: Amenities) => parent.crib, +doorman: (parent: Amenities) => parent.doorman, +dryer: (parent: Amenities) => parent.dryer, +elevator: (parent: Amenities) => parent.elevator, +essentials: (parent: Amenities) => parent.essentials, +familyKidFriendly: (parent: Amenities) => parent.familyKidFriendly, +freeParkingOnPremises: (parent: Amenities) => parent.freeParkingOnPremises, +freeParkingOnStreet: (parent: Amenities) => parent.freeParkingOnStreet, +gym: (parent: Amenities) => parent.gym, +hairDryer: (parent: Amenities) => parent.hairDryer, +hangers: (parent: Amenities) => parent.hangers, +heating: (parent: Amenities) => parent.heating, +hotTub: (parent: Amenities) => parent.hotTub, +id: (parent: Amenities) => parent.id, +indoorFireplace: (parent: Amenities) => parent.indoorFireplace, +internet: (parent: Amenities) => parent.internet, +iron: (parent: Amenities) => parent.iron, +kitchen: (parent: Amenities) => parent.kitchen, +laptopFriendlyWorkspace: (parent: Amenities) => parent.laptopFriendlyWorkspace, +paidParkingOffPremises: (parent: Amenities) => parent.paidParkingOffPremises, +petsAllowed: (parent: Amenities) => parent.petsAllowed, +pool: (parent: Amenities) => parent.pool, +privateEntrance: (parent: Amenities) => parent.privateEntrance, +shampoo: (parent: Amenities) => parent.shampoo, +smokingAllowed: (parent: Amenities) => parent.smokingAllowed, +suitableForEvents: (parent: Amenities) => parent.suitableForEvents, +tv: (parent: Amenities) => parent.tv, +washer: (parent: Amenities) => parent.washer, +wheelchairAccessible: (parent: Amenities) => parent.wheelchairAccessible, +wirelessInternet: (parent: Amenities) => parent.wirelessInternet, + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + export type Amenities_AirConditioning_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_BabyBath_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_BabyMonitor_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_BabysitterRecommendations_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Bathtub_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Breakfast_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_BuzzerWirelessIntercom_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_CableTv_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_ChangingTable_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_ChildrensBooksAndToys_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_ChildrensDinnerware_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Crib_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Doorman_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Dryer_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Elevator_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Essentials_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_FamilyKidFriendly_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_FreeParkingOnPremises_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_FreeParkingOnStreet_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Gym_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_HairDryer_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Hangers_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Heating_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_HotTub_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Id_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type Amenities_IndoorFireplace_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Internet_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Iron_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Kitchen_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_LaptopFriendlyWorkspace_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_PaidParkingOffPremises_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_PetsAllowed_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Pool_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_PrivateEntrance_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Shampoo_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_SmokingAllowed_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_SuitableForEvents_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Tv_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_Washer_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_WheelchairAccessible_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type Amenities_WirelessInternet_Resolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + + export interface Amenities_Resolvers { + + airConditioning: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + babyBath: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + babyMonitor: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + babysitterRecommendations: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + bathtub: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + breakfast: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + buzzerWirelessIntercom: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + cableTv: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + changingTable: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + childrensBooksAndToys: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + childrensDinnerware: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + crib: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + doorman: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + dryer: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + + elevator: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + - city: ( - parent: ExperiencesByCity, + essentials: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => City | Promise; -} - -// Types for Viewer -export const Viewer_defaultResolvers = { - me: (parent: Viewer) => parent.me, - bookings: (parent: Viewer) => parent.bookings -}; + info: GraphQLResolveInfo, + ) => boolean | Promise, + -export type Viewer_Me_Resolver = ( - parent: Viewer, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | Promise; - -export type Viewer_Bookings_Resolver = ( - parent: Viewer, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Booking[] | Promise; - -export interface Viewer_Resolvers { - me: ( - parent: Viewer, + familyKidFriendly: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - bookings: ( - parent: Viewer, + freeParkingOnPremises: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; -} - -// Types for User -export const User_defaultResolvers = { - bookings: (parent: User) => parent.bookings, - createdAt: (parent: User) => parent.createdAt, - email: (parent: User) => parent.email, - firstName: (parent: User) => parent.firstName, - hostingExperiences: (parent: User) => parent.hostingExperiences, - id: (parent: User) => parent.id, - isSuperHost: (parent: User) => parent.isSuperHost, - lastName: (parent: User) => parent.lastName, - notifications: (parent: User) => parent.notifications, - ownedPlaces: (parent: User) => parent.ownedPlaces, - phone: (parent: User) => parent.phone, - profilePicture: (parent: User) => - parent.profilePicture === undefined ? null : parent.profilePicture, - receivedMessages: (parent: User) => parent.receivedMessages, - responseRate: (parent: User) => - parent.responseRate === undefined ? null : parent.responseRate, - responseTime: (parent: User) => - parent.responseTime === undefined ? null : parent.responseTime, - sentMessages: (parent: User) => parent.sentMessages, - updatedAt: (parent: User) => parent.updatedAt -}; + info: GraphQLResolveInfo, + ) => boolean | Promise, + -export type User_Bookings_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Booking[] | Promise; - -export type User_CreatedAt_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_Email_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_FirstName_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_HostingExperiences_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Experience[] | Promise; - -export type User_Id_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_IsSuperHost_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type User_LastName_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_Location_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Location | Promise; - -export type User_Notifications_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Notification[] | Promise; - -export type User_OwnedPlaces_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Place[] | Promise; - -export type User_PaymentAccount_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PaymentAccount[] | Promise; - -export type User_Phone_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_ProfilePicture_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Picture | null | Promise; - -export type User_ReceivedMessages_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Message[] | Promise; - -export type User_ResponseRate_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type User_ResponseTime_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type User_SentMessages_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Message[] | Promise; - -export type User_UpdatedAt_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type User_Token_Resolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface User_Resolvers { - bookings: ( - parent: User, + freeParkingOnStreet: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - createdAt: ( - parent: User, + gym: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - email: ( - parent: User, + hairDryer: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - firstName: ( - parent: User, + hangers: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - hostingExperiences: ( - parent: User, + heating: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - id: ( - parent: User, + hotTub: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - isSuperHost: ( - parent: User, + id: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - lastName: ( - parent: User, + indoorFireplace: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - location: ( - parent: User, + internet: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - notifications: ( - parent: User, + iron: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Notification[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - ownedPlaces: ( - parent: User, + kitchen: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Place[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - paymentAccount: ( - parent: User, + laptopFriendlyWorkspace: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - phone: ( - parent: User, + paidParkingOffPremises: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - profilePicture: ( - parent: User, + petsAllowed: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture | null | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - receivedMessages: ( - parent: User, + pool: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Message[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - responseRate: ( - parent: User, + privateEntrance: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - responseTime: ( - parent: User, + shampoo: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - sentMessages: ( - parent: User, + smokingAllowed: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Message[] | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - updatedAt: ( - parent: User, + suitableForEvents: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - token: ( - parent: User, + tv: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} - -// Types for Booking -export const Booking_defaultResolvers = { - id: (parent: Booking) => parent.id, - createdAt: (parent: Booking) => parent.createdAt, - bookee: (parent: Booking) => parent.bookee, - place: (parent: Booking) => parent.place, - startDate: (parent: Booking) => parent.startDate, - endDate: (parent: Booking) => parent.endDate, - payment: (parent: Booking) => parent.payment -}; + info: GraphQLResolveInfo, + ) => boolean | Promise, + -export type Booking_Id_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Booking_CreatedAt_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Booking_Bookee_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | Promise; - -export type Booking_Place_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Place | Promise; - -export type Booking_StartDate_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Booking_EndDate_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Booking_Payment_Resolver = ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Payment | Promise; - -export interface Booking_Resolvers { - id: ( - parent: Booking, + washer: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - createdAt: ( - parent: Booking, + wheelchairAccessible: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - bookee: ( - parent: Booking, + wirelessInternet: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + + } + + + + + // Types for Pricing + export const Pricing_defaultResolvers = { + averageMonthly: (parent: Pricing) => parent.averageMonthly, +averageWeekly: (parent: Pricing) => parent.averageWeekly, +basePrice: (parent: Pricing) => parent.basePrice, +cleaningFee: (parent: Pricing) => parent.cleaningFee === undefined ? null : parent.cleaningFee, +currency: (parent: Pricing) => parent.currency === undefined ? null : parent.currency, +extraGuests: (parent: Pricing) => parent.extraGuests === undefined ? null : parent.extraGuests, +id: (parent: Pricing) => parent.id, +monthlyDiscount: (parent: Pricing) => parent.monthlyDiscount === undefined ? null : parent.monthlyDiscount, +perNight: (parent: Pricing) => parent.perNight, +securityDeposit: (parent: Pricing) => parent.securityDeposit === undefined ? null : parent.securityDeposit, +smartPricing: (parent: Pricing) => parent.smartPricing, +weekendPricing: (parent: Pricing) => parent.weekendPricing === undefined ? null : parent.weekendPricing, +weeklyDiscount: (parent: Pricing) => parent.weeklyDiscount === undefined ? null : parent.weeklyDiscount, + } - place: ( - parent: Booking, + + + + + + + + + + + + + + + + + + export type Pricing_AverageMonthly_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Place | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - startDate: ( - parent: Booking, + export type Pricing_AverageWeekly_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - endDate: ( - parent: Booking, + export type Pricing_BasePrice_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - payment: ( - parent: Booking, + export type Pricing_CleaningFee_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Payment | Promise; -} + info: GraphQLResolveInfo, + ) + => number| null | Promise + -// Types for Place -export const Place_defaultResolvers = { - id: (parent: Place) => parent.id, - name: (parent: Place) => (parent.name === undefined ? null : parent.name), - size: (parent: Place) => (parent.size === undefined ? null : parent.size), - shortDescription: (parent: Place) => parent.shortDescription, - description: (parent: Place) => parent.description, - slug: (parent: Place) => parent.slug, - maxGuests: (parent: Place) => parent.maxGuests, - numBedrooms: (parent: Place) => parent.numBedrooms, - numBeds: (parent: Place) => parent.numBeds, - numBaths: (parent: Place) => parent.numBaths, - reviews: (parent: Place) => parent.reviews, - amenities: (parent: Place) => parent.amenities, - host: (parent: Place) => parent.host, - pricing: (parent: Place) => parent.pricing, - location: (parent: Place) => parent.location, - views: (parent: Place) => parent.views, - guestRequirements: (parent: Place) => - parent.guestRequirements === undefined ? null : parent.guestRequirements, - policies: (parent: Place) => - parent.policies === undefined ? null : parent.policies, - houseRules: (parent: Place) => - parent.houseRules === undefined ? null : parent.houseRules, - bookings: (parent: Place) => parent.bookings, - pictures: (parent: Place) => parent.pictures, - popularity: (parent: Place) => parent.popularity -}; + export type Pricing_Currency_Resolver = + ( + parent: Pricing, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => CURRENCY| null | Promise + -export type Place_Id_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Place_Name_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export type Place_Size_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PLACE_SIZES | null | Promise; - -export type Place_ShortDescription_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Place_Description_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Place_Slug_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Place_MaxGuests_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Place_NumBedrooms_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Place_NumBeds_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Place_NumBaths_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Place_Reviews_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Review[] | Promise; - -export type Place_Amenities_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Amenities | Promise; - -export type Place_Host_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | Promise; - -export type Place_Pricing_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Pricing | Promise; - -export type Place_Location_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Location | Promise; - -export type Place_Views_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PlaceViews | Promise; - -export type Place_GuestRequirements_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => GuestRequirements | null | Promise; - -export type Place_Policies_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Policies | null | Promise; - -export type Place_HouseRules_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => HouseRules | null | Promise; - -export type Place_Bookings_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Booking[] | Promise; - -export type Place_Pictures_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Picture[] | Promise; - -export type Place_Popularity_Resolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Place_Resolvers { - id: ( - parent: Place, + export type Pricing_ExtraGuests_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - name: ( - parent: Place, + export type Pricing_Id_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - size: ( - parent: Place, + export type Pricing_MonthlyDiscount_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PLACE_SIZES | null | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - shortDescription: ( - parent: Place, + export type Pricing_PerNight_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - description: ( - parent: Place, + export type Pricing_SecurityDeposit_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - slug: ( - parent: Place, + export type Pricing_SmartPricing_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - maxGuests: ( - parent: Place, + export type Pricing_WeekendPricing_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - numBedrooms: ( - parent: Place, + export type Pricing_WeeklyDiscount_Resolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - numBeds: ( - parent: Place, + + export interface Pricing_Resolvers { + + averageMonthly: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - numBaths: ( - parent: Place, + averageWeekly: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - reviews: ( - parent: Place, + basePrice: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Review[] | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - amenities: ( - parent: Place, + cleaningFee: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Amenities | Promise; + info: GraphQLResolveInfo, + ) => number| null | Promise, + - host: ( - parent: Place, + currency: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) => CURRENCY| null | Promise, + - pricing: ( - parent: Place, + extraGuests: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Pricing | Promise; + info: GraphQLResolveInfo, + ) => number| null | Promise, + - location: ( - parent: Place, + id: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - views: ( - parent: Place, + monthlyDiscount: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PlaceViews | Promise; + info: GraphQLResolveInfo, + ) => number| null | Promise, + - guestRequirements: ( - parent: Place, + perNight: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => GuestRequirements | null | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - policies: ( - parent: Place, + securityDeposit: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Policies | null | Promise; + info: GraphQLResolveInfo, + ) => number| null | Promise, + - houseRules: ( - parent: Place, + smartPricing: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => HouseRules | null | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - bookings: ( - parent: Place, + weekendPricing: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; + info: GraphQLResolveInfo, + ) => number| null | Promise, + - pictures: ( - parent: Place, + weeklyDiscount: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; + info: GraphQLResolveInfo, + ) => number| null | Promise, + + } + + + + + // Types for PlaceViews + export const PlaceViews_defaultResolvers = { + id: (parent: PlaceViews) => parent.id, +lastWeek: (parent: PlaceViews) => parent.lastWeek, + } - popularity: ( - parent: Place, + + + + + + + export type PlaceViews_Id_Resolver = + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} + info: GraphQLResolveInfo, + ) + => string | Promise + -// Types for Amenities -export const Amenities_defaultResolvers = { - airConditioning: (parent: Amenities) => parent.airConditioning, - babyBath: (parent: Amenities) => parent.babyBath, - babyMonitor: (parent: Amenities) => parent.babyMonitor, - babysitterRecommendations: (parent: Amenities) => - parent.babysitterRecommendations, - bathtub: (parent: Amenities) => parent.bathtub, - breakfast: (parent: Amenities) => parent.breakfast, - buzzerWirelessIntercom: (parent: Amenities) => parent.buzzerWirelessIntercom, - cableTv: (parent: Amenities) => parent.cableTv, - changingTable: (parent: Amenities) => parent.changingTable, - childrensBooksAndToys: (parent: Amenities) => parent.childrensBooksAndToys, - childrensDinnerware: (parent: Amenities) => parent.childrensDinnerware, - crib: (parent: Amenities) => parent.crib, - doorman: (parent: Amenities) => parent.doorman, - dryer: (parent: Amenities) => parent.dryer, - elevator: (parent: Amenities) => parent.elevator, - essentials: (parent: Amenities) => parent.essentials, - familyKidFriendly: (parent: Amenities) => parent.familyKidFriendly, - freeParkingOnPremises: (parent: Amenities) => parent.freeParkingOnPremises, - freeParkingOnStreet: (parent: Amenities) => parent.freeParkingOnStreet, - gym: (parent: Amenities) => parent.gym, - hairDryer: (parent: Amenities) => parent.hairDryer, - hangers: (parent: Amenities) => parent.hangers, - heating: (parent: Amenities) => parent.heating, - hotTub: (parent: Amenities) => parent.hotTub, - id: (parent: Amenities) => parent.id, - indoorFireplace: (parent: Amenities) => parent.indoorFireplace, - internet: (parent: Amenities) => parent.internet, - iron: (parent: Amenities) => parent.iron, - kitchen: (parent: Amenities) => parent.kitchen, - laptopFriendlyWorkspace: (parent: Amenities) => - parent.laptopFriendlyWorkspace, - paidParkingOffPremises: (parent: Amenities) => parent.paidParkingOffPremises, - petsAllowed: (parent: Amenities) => parent.petsAllowed, - pool: (parent: Amenities) => parent.pool, - privateEntrance: (parent: Amenities) => parent.privateEntrance, - shampoo: (parent: Amenities) => parent.shampoo, - smokingAllowed: (parent: Amenities) => parent.smokingAllowed, - suitableForEvents: (parent: Amenities) => parent.suitableForEvents, - tv: (parent: Amenities) => parent.tv, - washer: (parent: Amenities) => parent.washer, - wheelchairAccessible: (parent: Amenities) => parent.wheelchairAccessible, - wirelessInternet: (parent: Amenities) => parent.wirelessInternet -}; + export type PlaceViews_LastWeek_Resolver = + ( + parent: PlaceViews, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + -export type Amenities_AirConditioning_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_BabyBath_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_BabyMonitor_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_BabysitterRecommendations_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Bathtub_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Breakfast_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_BuzzerWirelessIntercom_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_CableTv_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_ChangingTable_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_ChildrensBooksAndToys_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_ChildrensDinnerware_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Crib_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Doorman_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Dryer_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Elevator_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Essentials_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_FamilyKidFriendly_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_FreeParkingOnPremises_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_FreeParkingOnStreet_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Gym_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_HairDryer_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Hangers_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Heating_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_HotTub_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Id_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Amenities_IndoorFireplace_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Internet_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Iron_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Kitchen_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_LaptopFriendlyWorkspace_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_PaidParkingOffPremises_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_PetsAllowed_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Pool_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_PrivateEntrance_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Shampoo_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_SmokingAllowed_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_SuitableForEvents_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Tv_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_Washer_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_WheelchairAccessible_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Amenities_WirelessInternet_Resolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export interface Amenities_Resolvers { - airConditioning: ( - parent: Amenities, + + export interface PlaceViews_Resolvers { + + id: + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - babyBath: ( - parent: Amenities, + lastWeek: + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for GuestRequirements + export const GuestRequirements_defaultResolvers = { + govIssuedId: (parent: GuestRequirements) => parent.govIssuedId, +guestTripInformation: (parent: GuestRequirements) => parent.guestTripInformation, +id: (parent: GuestRequirements) => parent.id, +recommendationsFromOtherHosts: (parent: GuestRequirements) => parent.recommendationsFromOtherHosts, + } - babyMonitor: ( - parent: Amenities, + + + + + + + + + export type GuestRequirements_GovIssuedId_Resolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - babysitterRecommendations: ( - parent: Amenities, + export type GuestRequirements_GuestTripInformation_Resolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - bathtub: ( - parent: Amenities, + export type GuestRequirements_Id_Resolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - breakfast: ( - parent: Amenities, + export type GuestRequirements_RecommendationsFromOtherHosts_Resolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - buzzerWirelessIntercom: ( - parent: Amenities, + + export interface GuestRequirements_Resolvers { + + govIssuedId: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - cableTv: ( - parent: Amenities, + guestTripInformation: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + - changingTable: ( - parent: Amenities, + id: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - childrensBooksAndToys: ( - parent: Amenities, + recommendationsFromOtherHosts: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean | Promise, + + } + + + + + // Types for Policies + export const Policies_defaultResolvers = { + checkInEndTime: (parent: Policies) => parent.checkInEndTime, +checkInStartTime: (parent: Policies) => parent.checkInStartTime, +checkoutTime: (parent: Policies) => parent.checkoutTime, +createdAt: (parent: Policies) => parent.createdAt, +id: (parent: Policies) => parent.id, +updatedAt: (parent: Policies) => parent.updatedAt, + } - childrensDinnerware: ( - parent: Amenities, + + + + + + + + + + + export type Policies_CheckInEndTime_Resolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - crib: ( - parent: Amenities, + export type Policies_CheckInStartTime_Resolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - doorman: ( - parent: Amenities, + export type Policies_CheckoutTime_Resolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - dryer: ( - parent: Amenities, + export type Policies_CreatedAt_Resolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - elevator: ( - parent: Amenities, + export type Policies_Id_Resolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - essentials: ( - parent: Amenities, + export type Policies_UpdatedAt_Resolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - familyKidFriendly: ( - parent: Amenities, + + export interface Policies_Resolvers { + + checkInEndTime: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - freeParkingOnPremises: ( - parent: Amenities, + checkInStartTime: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - freeParkingOnStreet: ( - parent: Amenities, + checkoutTime: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - gym: ( - parent: Amenities, + createdAt: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - hairDryer: ( - parent: Amenities, + id: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - hangers: ( - parent: Amenities, + updatedAt: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for HouseRules + export const HouseRules_defaultResolvers = { + additionalRules: (parent: HouseRules) => parent.additionalRules === undefined ? null : parent.additionalRules, +createdAt: (parent: HouseRules) => parent.createdAt, +id: (parent: HouseRules) => parent.id, +partiesAndEventsAllowed: (parent: HouseRules) => parent.partiesAndEventsAllowed === undefined ? null : parent.partiesAndEventsAllowed, +petsAllowed: (parent: HouseRules) => parent.petsAllowed === undefined ? null : parent.petsAllowed, +smokingAllowed: (parent: HouseRules) => parent.smokingAllowed === undefined ? null : parent.smokingAllowed, +suitableForChildren: (parent: HouseRules) => parent.suitableForChildren === undefined ? null : parent.suitableForChildren, +suitableForInfants: (parent: HouseRules) => parent.suitableForInfants === undefined ? null : parent.suitableForInfants, +updatedAt: (parent: HouseRules) => parent.updatedAt, + } - heating: ( - parent: Amenities, + + + + + + + + + + + + + + export type HouseRules_AdditionalRules_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - hotTub: ( - parent: Amenities, + export type HouseRules_CreatedAt_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - id: ( - parent: Amenities, + export type HouseRules_Id_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - indoorFireplace: ( - parent: Amenities, + export type HouseRules_PartiesAndEventsAllowed_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - internet: ( - parent: Amenities, + export type HouseRules_PetsAllowed_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - iron: ( - parent: Amenities, + export type HouseRules_SmokingAllowed_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - kitchen: ( - parent: Amenities, + export type HouseRules_SuitableForChildren_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - laptopFriendlyWorkspace: ( - parent: Amenities, + export type HouseRules_SuitableForInfants_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - paidParkingOffPremises: ( - parent: Amenities, + export type HouseRules_UpdatedAt_Resolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - petsAllowed: ( - parent: Amenities, + + export interface HouseRules_Resolvers { + + additionalRules: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string| null | Promise, + - pool: ( - parent: Amenities, + createdAt: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - privateEntrance: ( - parent: Amenities, + id: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - shampoo: ( - parent: Amenities, + partiesAndEventsAllowed: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + - smokingAllowed: ( - parent: Amenities, + petsAllowed: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + - suitableForEvents: ( - parent: Amenities, + smokingAllowed: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + - tv: ( - parent: Amenities, + suitableForChildren: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + - washer: ( - parent: Amenities, + suitableForInfants: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => boolean| null | Promise, + - wheelchairAccessible: ( - parent: Amenities, + updatedAt: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for Payment + export const Payment_defaultResolvers = { + booking: (parent: Payment) => parent.booking, +createdAt: (parent: Payment) => parent.createdAt, +id: (parent: Payment) => parent.id, +paymentMethod: (parent: Payment) => parent.paymentMethod, +serviceFee: (parent: Payment) => parent.serviceFee, + } + + + + - wirelessInternet: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; -} -// Types for Pricing -export const Pricing_defaultResolvers = { - averageMonthly: (parent: Pricing) => parent.averageMonthly, - averageWeekly: (parent: Pricing) => parent.averageWeekly, - basePrice: (parent: Pricing) => parent.basePrice, - cleaningFee: (parent: Pricing) => - parent.cleaningFee === undefined ? null : parent.cleaningFee, - currency: (parent: Pricing) => - parent.currency === undefined ? null : parent.currency, - extraGuests: (parent: Pricing) => - parent.extraGuests === undefined ? null : parent.extraGuests, - id: (parent: Pricing) => parent.id, - monthlyDiscount: (parent: Pricing) => - parent.monthlyDiscount === undefined ? null : parent.monthlyDiscount, - perNight: (parent: Pricing) => parent.perNight, - securityDeposit: (parent: Pricing) => - parent.securityDeposit === undefined ? null : parent.securityDeposit, - smartPricing: (parent: Pricing) => parent.smartPricing, - weekendPricing: (parent: Pricing) => - parent.weekendPricing === undefined ? null : parent.weekendPricing, - weeklyDiscount: (parent: Pricing) => - parent.weeklyDiscount === undefined ? null : parent.weeklyDiscount -}; -export type Pricing_AverageMonthly_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Pricing_AverageWeekly_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Pricing_BasePrice_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Pricing_CleaningFee_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type Pricing_Currency_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => CURRENCY | null | Promise; - -export type Pricing_ExtraGuests_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type Pricing_Id_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Pricing_MonthlyDiscount_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type Pricing_PerNight_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Pricing_SecurityDeposit_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type Pricing_SmartPricing_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type Pricing_WeekendPricing_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export type Pricing_WeeklyDiscount_Resolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | null | Promise; - -export interface Pricing_Resolvers { - averageMonthly: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - averageWeekly: ( - parent: Pricing, + + + export type Payment_Booking_Resolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => Booking | Promise + - basePrice: ( - parent: Pricing, + export type Payment_CreatedAt_Resolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - cleaningFee: ( - parent: Pricing, + export type Payment_Id_Resolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - currency: ( - parent: Pricing, + export type Payment_PaymentMethod_Resolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => CURRENCY | null | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount | Promise + - extraGuests: ( - parent: Pricing, + export type Payment_ServiceFee_Resolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - id: ( - parent: Pricing, + + export interface Payment_Resolvers { + + booking: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => Booking | Promise, + - monthlyDiscount: ( - parent: Pricing, + createdAt: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - perNight: ( - parent: Pricing, + id: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - securityDeposit: ( - parent: Pricing, + paymentMethod: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) => PaymentAccount | Promise, + - smartPricing: ( - parent: Pricing, + serviceFee: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + + } + + + + + // Types for PaymentAccount + export const PaymentAccount_defaultResolvers = { + id: (parent: PaymentAccount) => parent.id, +createdAt: (parent: PaymentAccount) => parent.createdAt, +type: (parent: PaymentAccount) => parent.type === undefined ? null : parent.type, +user: (parent: PaymentAccount) => parent.user, +payments: (parent: PaymentAccount) => parent.payments, +paypal: (parent: PaymentAccount) => parent.paypal === undefined ? null : parent.paypal, +creditcard: (parent: PaymentAccount) => parent.creditcard === undefined ? null : parent.creditcard, + } - weekendPricing: ( - parent: Pricing, + + + + + + + + + + + + export type PaymentAccount_Id_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - weeklyDiscount: ( - parent: Pricing, + export type PaymentAccount_CreatedAt_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; -} + info: GraphQLResolveInfo, + ) + => string | Promise + -// Types for PlaceViews -export const PlaceViews_defaultResolvers = { - id: (parent: PlaceViews) => parent.id, - lastWeek: (parent: PlaceViews) => parent.lastWeek -}; - -export type PlaceViews_Id_Resolver = ( - parent: PlaceViews, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type PlaceViews_LastWeek_Resolver = ( - parent: PlaceViews, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface PlaceViews_Resolvers { - id: ( - parent: PlaceViews, + export type PaymentAccount_Type_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => PAYMENT_PROVIDER| null | Promise + - lastWeek: ( - parent: PlaceViews, + export type PaymentAccount_User_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} - -// Types for GuestRequirements -export const GuestRequirements_defaultResolvers = { - govIssuedId: (parent: GuestRequirements) => parent.govIssuedId, - guestTripInformation: (parent: GuestRequirements) => - parent.guestTripInformation, - id: (parent: GuestRequirements) => parent.id, - recommendationsFromOtherHosts: (parent: GuestRequirements) => - parent.recommendationsFromOtherHosts -}; + info: GraphQLResolveInfo, + ) + => User | Promise + -export type GuestRequirements_GovIssuedId_Resolver = ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type GuestRequirements_GuestTripInformation_Resolver = ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type GuestRequirements_Id_Resolver = ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type GuestRequirements_RecommendationsFromOtherHosts_Resolver = ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; - -export interface GuestRequirements_Resolvers { - govIssuedId: ( - parent: GuestRequirements, + export type PaymentAccount_Payments_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => Payment[] | Promise + - guestTripInformation: ( - parent: GuestRequirements, + export type PaymentAccount_Paypal_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => PaypalInformation| null | Promise + - id: ( - parent: GuestRequirements, + export type PaymentAccount_Creditcard_Resolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => CreditCardInformation| null | Promise + - recommendationsFromOtherHosts: ( - parent: GuestRequirements, + + export interface PaymentAccount_Resolvers { + + id: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; -} - -// Types for Policies -export const Policies_defaultResolvers = { - checkInEndTime: (parent: Policies) => parent.checkInEndTime, - checkInStartTime: (parent: Policies) => parent.checkInStartTime, - checkoutTime: (parent: Policies) => parent.checkoutTime, - createdAt: (parent: Policies) => parent.createdAt, - id: (parent: Policies) => parent.id, - updatedAt: (parent: Policies) => parent.updatedAt -}; + info: GraphQLResolveInfo, + ) => string | Promise, + -export type Policies_CheckInEndTime_Resolver = ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Policies_CheckInStartTime_Resolver = ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Policies_CheckoutTime_Resolver = ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type Policies_CreatedAt_Resolver = ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Policies_Id_Resolver = ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Policies_UpdatedAt_Resolver = ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface Policies_Resolvers { - checkInEndTime: ( - parent: Policies, + createdAt: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - checkInStartTime: ( - parent: Policies, + type: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => PAYMENT_PROVIDER| null | Promise, + - checkoutTime: ( - parent: Policies, + user: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => User | Promise, + - createdAt: ( - parent: Policies, + payments: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => Payment[] | Promise, + - id: ( - parent: Policies, + paypal: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => PaypalInformation| null | Promise, + - updatedAt: ( - parent: Policies, + creditcard: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) => CreditCardInformation| null | Promise, + + } + + + + + // Types for PaypalInformation + export const PaypalInformation_defaultResolvers = { + createdAt: (parent: PaypalInformation) => parent.createdAt, +email: (parent: PaypalInformation) => parent.email, +id: (parent: PaypalInformation) => parent.id, +paymentAccount: (parent: PaypalInformation) => parent.paymentAccount, + } -// Types for HouseRules -export const HouseRules_defaultResolvers = { - additionalRules: (parent: HouseRules) => - parent.additionalRules === undefined ? null : parent.additionalRules, - createdAt: (parent: HouseRules) => parent.createdAt, - id: (parent: HouseRules) => parent.id, - partiesAndEventsAllowed: (parent: HouseRules) => - parent.partiesAndEventsAllowed === undefined - ? null - : parent.partiesAndEventsAllowed, - petsAllowed: (parent: HouseRules) => - parent.petsAllowed === undefined ? null : parent.petsAllowed, - smokingAllowed: (parent: HouseRules) => - parent.smokingAllowed === undefined ? null : parent.smokingAllowed, - suitableForChildren: (parent: HouseRules) => - parent.suitableForChildren === undefined - ? null - : parent.suitableForChildren, - suitableForInfants: (parent: HouseRules) => - parent.suitableForInfants === undefined ? null : parent.suitableForInfants, - updatedAt: (parent: HouseRules) => parent.updatedAt -}; + -export type HouseRules_AdditionalRules_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | null | Promise; - -export type HouseRules_CreatedAt_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type HouseRules_Id_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type HouseRules_PartiesAndEventsAllowed_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type HouseRules_PetsAllowed_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type HouseRules_SmokingAllowed_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type HouseRules_SuitableForChildren_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type HouseRules_SuitableForInfants_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | null | Promise; - -export type HouseRules_UpdatedAt_Resolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface HouseRules_Resolvers { - additionalRules: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + - createdAt: ( - parent: HouseRules, + + + + + export type PaypalInformation_CreatedAt_Resolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - id: ( - parent: HouseRules, + export type PaypalInformation_Email_Resolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - partiesAndEventsAllowed: ( - parent: HouseRules, + export type PaypalInformation_Id_Resolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - petsAllowed: ( - parent: HouseRules, + export type PaypalInformation_PaymentAccount_Resolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount | Promise + - smokingAllowed: ( - parent: HouseRules, + + export interface PaypalInformation_Resolvers { + + createdAt: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - suitableForChildren: ( - parent: HouseRules, + email: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - suitableForInfants: ( - parent: HouseRules, + id: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - updatedAt: ( - parent: HouseRules, + paymentAccount: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) => PaymentAccount | Promise, + + } + + + + + // Types for CreditCardInformation + export const CreditCardInformation_defaultResolvers = { + cardNumber: (parent: CreditCardInformation) => parent.cardNumber, +country: (parent: CreditCardInformation) => parent.country, +createdAt: (parent: CreditCardInformation) => parent.createdAt, +expiresOnMonth: (parent: CreditCardInformation) => parent.expiresOnMonth, +expiresOnYear: (parent: CreditCardInformation) => parent.expiresOnYear, +firstName: (parent: CreditCardInformation) => parent.firstName, +id: (parent: CreditCardInformation) => parent.id, +lastName: (parent: CreditCardInformation) => parent.lastName, +paymentAccount: (parent: CreditCardInformation) => parent.paymentAccount === undefined ? null : parent.paymentAccount, +postalCode: (parent: CreditCardInformation) => parent.postalCode, +securityCode: (parent: CreditCardInformation) => parent.securityCode, + } -// Types for Payment -export const Payment_defaultResolvers = { - booking: (parent: Payment) => parent.booking, - createdAt: (parent: Payment) => parent.createdAt, - id: (parent: Payment) => parent.id, - paymentMethod: (parent: Payment) => parent.paymentMethod, - serviceFee: (parent: Payment) => parent.serviceFee -}; + -export type Payment_Booking_Resolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Booking | Promise; - -export type Payment_CreatedAt_Resolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Payment_Id_Resolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Payment_PaymentMethod_Resolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PaymentAccount | Promise; - -export type Payment_ServiceFee_Resolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export interface Payment_Resolvers { - booking: ( - parent: Payment, + + + + + + + + + + + + + + export type CreditCardInformation_CardNumber_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - createdAt: ( - parent: Payment, + export type CreditCardInformation_Country_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - id: ( - parent: Payment, + export type CreditCardInformation_CreatedAt_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - paymentMethod: ( - parent: Payment, + export type CreditCardInformation_ExpiresOnMonth_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - serviceFee: ( - parent: Payment, + export type CreditCardInformation_ExpiresOnYear_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; -} + info: GraphQLResolveInfo, + ) + => number | Promise + -// Types for PaymentAccount -export const PaymentAccount_defaultResolvers = { - id: (parent: PaymentAccount) => parent.id, - createdAt: (parent: PaymentAccount) => parent.createdAt, - type: (parent: PaymentAccount) => - parent.type === undefined ? null : parent.type, - user: (parent: PaymentAccount) => parent.user, - payments: (parent: PaymentAccount) => parent.payments, - paypal: (parent: PaymentAccount) => - parent.paypal === undefined ? null : parent.paypal, - creditcard: (parent: PaymentAccount) => - parent.creditcard === undefined ? null : parent.creditcard -}; - -export type PaymentAccount_Id_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type PaymentAccount_CreatedAt_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type PaymentAccount_Type_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PAYMENT_PROVIDER | null | Promise; - -export type PaymentAccount_User_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | Promise; - -export type PaymentAccount_Payments_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => Payment[] | Promise; - -export type PaymentAccount_Paypal_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PaypalInformation | null | Promise; - -export type PaymentAccount_Creditcard_Resolver = ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => CreditCardInformation | null | Promise; - -export interface PaymentAccount_Resolvers { - id: ( - parent: PaymentAccount, + export type CreditCardInformation_FirstName_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - createdAt: ( - parent: PaymentAccount, + export type CreditCardInformation_Id_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - type: ( - parent: PaymentAccount, + export type CreditCardInformation_LastName_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PAYMENT_PROVIDER | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - user: ( - parent: PaymentAccount, + export type CreditCardInformation_PaymentAccount_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount| null | Promise + - payments: ( - parent: PaymentAccount, + export type CreditCardInformation_PostalCode_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Payment[] | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - paypal: ( - parent: PaymentAccount, + export type CreditCardInformation_SecurityCode_Resolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaypalInformation | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - creditcard: ( - parent: PaymentAccount, + + export interface CreditCardInformation_Resolvers { + + cardNumber: + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => CreditCardInformation | null | Promise; -} - -// Types for PaypalInformation -export const PaypalInformation_defaultResolvers = { - createdAt: (parent: PaypalInformation) => parent.createdAt, - email: (parent: PaypalInformation) => parent.email, - id: (parent: PaypalInformation) => parent.id, - paymentAccount: (parent: PaypalInformation) => parent.paymentAccount -}; + info: GraphQLResolveInfo, + ) => string | Promise, + -export type PaypalInformation_CreatedAt_Resolver = ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type PaypalInformation_Email_Resolver = ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type PaypalInformation_Id_Resolver = ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type PaypalInformation_PaymentAccount_Resolver = ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PaymentAccount | Promise; - -export interface PaypalInformation_Resolvers { - createdAt: ( - parent: PaypalInformation, + country: + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - email: ( - parent: PaypalInformation, + createdAt: + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - id: ( - parent: PaypalInformation, + expiresOnMonth: + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => number | Promise, + - paymentAccount: ( - parent: PaypalInformation, + expiresOnYear: + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | Promise; -} + info: GraphQLResolveInfo, + ) => number | Promise, + -// Types for CreditCardInformation -export const CreditCardInformation_defaultResolvers = { - cardNumber: (parent: CreditCardInformation) => parent.cardNumber, - country: (parent: CreditCardInformation) => parent.country, - createdAt: (parent: CreditCardInformation) => parent.createdAt, - expiresOnMonth: (parent: CreditCardInformation) => parent.expiresOnMonth, - expiresOnYear: (parent: CreditCardInformation) => parent.expiresOnYear, - firstName: (parent: CreditCardInformation) => parent.firstName, - id: (parent: CreditCardInformation) => parent.id, - lastName: (parent: CreditCardInformation) => parent.lastName, - paymentAccount: (parent: CreditCardInformation) => - parent.paymentAccount === undefined ? null : parent.paymentAccount, - postalCode: (parent: CreditCardInformation) => parent.postalCode, - securityCode: (parent: CreditCardInformation) => parent.securityCode -}; - -export type CreditCardInformation_CardNumber_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_Country_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_CreatedAt_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_ExpiresOnMonth_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type CreditCardInformation_ExpiresOnYear_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => number | Promise; - -export type CreditCardInformation_FirstName_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_Id_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_LastName_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_PaymentAccount_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => PaymentAccount | null | Promise; - -export type CreditCardInformation_PostalCode_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type CreditCardInformation_SecurityCode_Resolver = ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface CreditCardInformation_Resolvers { - cardNumber: ( + firstName: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - country: ( + id: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - createdAt: ( + lastName: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - expiresOnMonth: ( + paymentAccount: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => PaymentAccount| null | Promise, + - expiresOnYear: ( + postalCode: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - firstName: ( + securityCode: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for Notification + export const Notification_defaultResolvers = { + createdAt: (parent: Notification) => parent.createdAt, +id: (parent: Notification) => parent.id, +link: (parent: Notification) => parent.link, +readDate: (parent: Notification) => parent.readDate, +type: (parent: Notification) => parent.type === undefined ? null : parent.type, +user: (parent: Notification) => parent.user, + } - id: ( - parent: CreditCardInformation, + + + + + + + + + + + export type Notification_CreatedAt_Resolver = + ( + parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - lastName: ( - parent: CreditCardInformation, + export type Notification_Id_Resolver = + ( + parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - paymentAccount: ( - parent: CreditCardInformation, + export type Notification_Link_Resolver = + ( + parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - postalCode: ( - parent: CreditCardInformation, + export type Notification_ReadDate_Resolver = + ( + parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - securityCode: ( - parent: CreditCardInformation, + export type Notification_Type_Resolver = + ( + parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) + => NOTIFICATION_TYPE| null | Promise + -// Types for Notification -export const Notification_defaultResolvers = { - createdAt: (parent: Notification) => parent.createdAt, - id: (parent: Notification) => parent.id, - link: (parent: Notification) => parent.link, - readDate: (parent: Notification) => parent.readDate, - type: (parent: Notification) => - parent.type === undefined ? null : parent.type, - user: (parent: Notification) => parent.user -}; + export type Notification_User_Resolver = + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + -export type Notification_CreatedAt_Resolver = ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Notification_Id_Resolver = ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Notification_Link_Resolver = ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Notification_ReadDate_Resolver = ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Notification_Type_Resolver = ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => NOTIFICATION_TYPE | null | Promise; - -export type Notification_User_Resolver = ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | Promise; - -export interface Notification_Resolvers { - createdAt: ( + + export interface Notification_Resolvers { + + createdAt: + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - id: ( + id: + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - link: ( + link: + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - readDate: ( + readDate: + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) => string | Promise, + - type: ( + type: + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NOTIFICATION_TYPE | null | Promise; + info: GraphQLResolveInfo, + ) => NOTIFICATION_TYPE| null | Promise, + - user: ( + user: + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; -} + info: GraphQLResolveInfo, + ) => User | Promise, + + } + + + + + // Types for Message + export const Message_defaultResolvers = { + createdAt: (parent: Message) => parent.createdAt, +deliveredAt: (parent: Message) => parent.deliveredAt, +id: (parent: Message) => parent.id, +readAt: (parent: Message) => parent.readAt, + } + + + + -// Types for Message -export const Message_defaultResolvers = { - createdAt: (parent: Message) => parent.createdAt, - deliveredAt: (parent: Message) => parent.deliveredAt, - id: (parent: Message) => parent.id, - readAt: (parent: Message) => parent.readAt -}; -export type Message_CreatedAt_Resolver = ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Message_DeliveredAt_Resolver = ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Message_Id_Resolver = ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type Message_ReadAt_Resolver = ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export interface Message_Resolvers { - createdAt: ( + + + + export type Message_CreatedAt_Resolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - deliveredAt: ( + export type Message_DeliveredAt_Resolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - id: ( + export type Message_Id_Resolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - readAt: ( + export type Message_ReadAt_Resolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; -} + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface Message_Resolvers { + + createdAt: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -// Types for Mutation -export const Mutation_defaultResolvers = {}; + deliveredAt: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -export interface Mutation_Args_Signup { - email: string; - password: string; - firstName: string; - lastName: string; - phone: string; -} + id: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -export interface Mutation_Args_Login { - email: string; - password: string; -} + readAt: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + + } + + + + + // Types for Mutation + export const Mutation_defaultResolvers = {} + + + + + export interface Mutation_Args_Signup { + email: string, +password: string, +firstName: string, +lastName: string, +phone: string + } + -export interface Mutation_Args_AddPaymentMethod { - cardNumber: string; - expiresOnMonth: number; - expiresOnYear: number; - securityCode: string; - firstName: string; - lastName: string; - postalCode: string; - country: string; -} + export interface Mutation_Args_Login { + email: string, +password: string + } + + + export interface Mutation_Args_AddPaymentMethod { + cardNumber: string, +expiresOnMonth: number, +expiresOnYear: number, +securityCode: string, +firstName: string, +lastName: string, +postalCode: string, +country: string + } + -export interface Mutation_Args_Book { - placeId: string; - checkIn: string; - checkOut: string; - numGuests: number; -} + export interface Mutation_Args_Book { + placeId: string, +checkIn: string, +checkOut: string, +numGuests: number + } + -export type Mutation_Signup_Resolver = ( - parent: {}, - args: Mutation_Args_Signup, - ctx: Context, - info: GraphQLResolveInfo -) => AuthPayload | Promise; - -export type Mutation_Login_Resolver = ( - parent: {}, - args: Mutation_Args_Login, - ctx: Context, - info: GraphQLResolveInfo -) => AuthPayload | Promise; - -export type Mutation_AddPaymentMethod_Resolver = ( - parent: {}, - args: Mutation_Args_AddPaymentMethod, - ctx: Context, - info: GraphQLResolveInfo -) => MutationResult | Promise; - -export type Mutation_Book_Resolver = ( - parent: {}, - args: Mutation_Args_Book, - ctx: Context, - info: GraphQLResolveInfo -) => MutationResult | Promise; - -export interface Mutation_Resolvers { - signup: ( + + export type Mutation_Signup_Resolver = + ( parent: {}, args: Mutation_Args_Signup, ctx: Context, - info: GraphQLResolveInfo - ) => AuthPayload | Promise; + info: GraphQLResolveInfo, + ) + => AuthPayload | Promise + - login: ( + export type Mutation_Login_Resolver = + ( parent: {}, args: Mutation_Args_Login, ctx: Context, - info: GraphQLResolveInfo - ) => AuthPayload | Promise; + info: GraphQLResolveInfo, + ) + => AuthPayload | Promise + - addPaymentMethod: ( + export type Mutation_AddPaymentMethod_Resolver = + ( parent: {}, args: Mutation_Args_AddPaymentMethod, ctx: Context, - info: GraphQLResolveInfo - ) => MutationResult | Promise; + info: GraphQLResolveInfo, + ) + => MutationResult | Promise + - book: ( + export type Mutation_Book_Resolver = + ( parent: {}, args: Mutation_Args_Book, ctx: Context, - info: GraphQLResolveInfo - ) => MutationResult | Promise; -} + info: GraphQLResolveInfo, + ) + => MutationResult | Promise + -// Types for AuthPayload -export const AuthPayload_defaultResolvers = { - token: (parent: AuthPayload) => parent.token, - user: (parent: AuthPayload) => parent.user -}; + + export interface Mutation_Resolvers { + + signup: + ( + parent: {}, + args: Mutation_Args_Signup, + ctx: Context, + info: GraphQLResolveInfo, + ) => AuthPayload | Promise, + + + login: + ( + parent: {}, + args: Mutation_Args_Login, + ctx: Context, + info: GraphQLResolveInfo, + ) => AuthPayload | Promise, + + + addPaymentMethod: + ( + parent: {}, + args: Mutation_Args_AddPaymentMethod, + ctx: Context, + info: GraphQLResolveInfo, + ) => MutationResult | Promise, + + + book: + ( + parent: {}, + args: Mutation_Args_Book, + ctx: Context, + info: GraphQLResolveInfo, + ) => MutationResult | Promise, + + } + + + + + // Types for AuthPayload + export const AuthPayload_defaultResolvers = { + token: (parent: AuthPayload) => parent.token, +user: (parent: AuthPayload) => parent.user, + } -export type AuthPayload_Token_Resolver = ( - parent: AuthPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => string | Promise; - -export type AuthPayload_User_Resolver = ( - parent: AuthPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => User | Promise; - -export interface AuthPayload_Resolvers { - token: ( + + + + + + + export type AuthPayload_Token_Resolver = + ( parent: AuthPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - user: ( + export type AuthPayload_User_Resolver = + ( parent: AuthPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; -} + info: GraphQLResolveInfo, + ) + => User | Promise + -// Types for MutationResult -export const MutationResult_defaultResolvers = { - success: (parent: MutationResult) => parent.success -}; + + export interface AuthPayload_Resolvers { + + token: + ( + parent: AuthPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => string | Promise, + -export type MutationResult_Success_Resolver = ( - parent: MutationResult, - args: {}, - ctx: Context, - info: GraphQLResolveInfo -) => boolean | Promise; + user: + ( + parent: AuthPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => User | Promise, + + } + + + + + // Types for MutationResult + export const MutationResult_defaultResolvers = { + success: (parent: MutationResult) => parent.success, + } + + + + -export interface MutationResult_Resolvers { - success: ( + + export type MutationResult_Success_Resolver = + ( parent: MutationResult, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; -} + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + + export interface MutationResult_Resolvers { + + success: + ( + parent: MutationResult, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) => boolean | Promise, + + } + + + + + export interface Resolvers { - Query: Query_Resolvers; - Experience: Experience_Resolvers; - ExperienceCategory: ExperienceCategory_Resolvers; - Location: Location_Resolvers; - Review: Review_Resolvers; - Picture: Picture_Resolvers; - Home: Home_Resolvers; - Reservation: Reservation_Resolvers; - Neighbourhood: Neighbourhood_Resolvers; - City: City_Resolvers; - ExperiencesByCity: ExperiencesByCity_Resolvers; - Viewer: Viewer_Resolvers; - User: User_Resolvers; - Booking: Booking_Resolvers; - Place: Place_Resolvers; - Amenities: Amenities_Resolvers; - Pricing: Pricing_Resolvers; - PlaceViews: PlaceViews_Resolvers; - GuestRequirements: GuestRequirements_Resolvers; - Policies: Policies_Resolvers; - HouseRules: HouseRules_Resolvers; - Payment: Payment_Resolvers; - PaymentAccount: PaymentAccount_Resolvers; - PaypalInformation: PaypalInformation_Resolvers; - CreditCardInformation: CreditCardInformation_Resolvers; - Notification: Notification_Resolvers; - Message: Message_Resolvers; - Mutation: Mutation_Resolvers; - AuthPayload: AuthPayload_Resolvers; - MutationResult: MutationResult_Resolvers; + Query: Query_Resolvers, +Experience: Experience_Resolvers, +ExperienceCategory: ExperienceCategory_Resolvers, +Location: Location_Resolvers, +Review: Review_Resolvers, +Picture: Picture_Resolvers, +Home: Home_Resolvers, +Reservation: Reservation_Resolvers, +Neighbourhood: Neighbourhood_Resolvers, +City: City_Resolvers, +ExperiencesByCity: ExperiencesByCity_Resolvers, +Viewer: Viewer_Resolvers, +User: User_Resolvers, +Booking: Booking_Resolvers, +Place: Place_Resolvers, +Amenities: Amenities_Resolvers, +Pricing: Pricing_Resolvers, +PlaceViews: PlaceViews_Resolvers, +GuestRequirements: GuestRequirements_Resolvers, +Policies: Policies_Resolvers, +HouseRules: HouseRules_Resolvers, +Payment: Payment_Resolvers, +PaymentAccount: PaymentAccount_Resolvers, +PaypalInformation: PaypalInformation_Resolvers, +CreditCardInformation: CreditCardInformation_Resolvers, +Notification: Notification_Resolvers, +Message: Message_Resolvers, +Mutation: Mutation_Resolvers, +AuthPayload: AuthPayload_Resolvers, +MutationResult: MutationResult_Resolvers } -" + + + " `; exports[`large schema 2`] = ` diff --git a/packages/graphqlgen/src/tests/typescript/__snapshots__/basic.test.ts.snap b/packages/graphqlgen/src/tests/typescript/__snapshots__/basic.test.ts.snap index 58d267cd..d699a536 100644 --- a/packages/graphqlgen/src/tests/typescript/__snapshots__/basic.test.ts.snap +++ b/packages/graphqlgen/src/tests/typescript/__snapshots__/basic.test.ts.snap @@ -1,111 +1,172 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`basic enum 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import { GraphQLResolveInfo } from \\"graphql\\"; -import { User } from \\"../../../fixtures/enum/types\\"; -type Context = any; +import { GraphQLResolveInfo } from 'graphql' +import { User } from '../../../fixtures/enum/types' +type Context = any + + + type EnumAnnotation = 'EDITOR' | 'COLLABORATOR' +type EnumAsUnionType = 'RED' | 'GREEN' | 'BLUE' -type EnumAnnotation = \\"EDITOR\\" | \\"COLLABORATOR\\"; -type EnumAsUnionType = \\"RED\\" | \\"GREEN\\" | \\"BLUE\\"; + export namespace QueryResolvers { -export namespace QueryResolvers { - export const defaultResolvers = {}; + export const defaultResolvers = {} + + + export interface ArgsCreateUser { - name: string; - type: EnumAnnotation; + name: string +type: EnumAnnotation } + - export type CreateUserResolver = ( + + export type CreateUserResolver = + ( parent: undefined, args: ArgsCreateUser, ctx: Context, - info: GraphQLResolveInfo - ) => User | null | Promise; + info: GraphQLResolveInfo, + ) + => User| null | Promise + + export interface Type { - createUser: ( - parent: undefined, - args: ArgsCreateUser, - ctx: Context, - info: GraphQLResolveInfo - ) => User | null | Promise; + + createUser: + ( + parent: undefined, + args: ArgsCreateUser, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User| null | Promise + } -} + + + + } + + export namespace UserResolvers { -export namespace UserResolvers { - export const defaultResolvers = { + export const defaultResolvers = { id: (parent: User) => parent.id, - name: (parent: User) => parent.name, - enumAsUnionType: (parent: User) => parent.enumAsUnionType - }; +name: (parent: User) => parent.name, +enumAsUnionType: (parent: User) => parent.enumAsUnionType, + } + + + + + + + - export type IdResolver = ( + + export type IdResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type NameResolver = ( + export type NameResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type EnumAnnotationResolver = ( + export type EnumAnnotationResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => EnumAnnotation | Promise; + info: GraphQLResolveInfo, + ) + => EnumAnnotation | Promise + - export type EnumAsUnionTypeResolver = ( + export type EnumAsUnionTypeResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => EnumAsUnionType | Promise; + info: GraphQLResolveInfo, + ) + => EnumAsUnionType | Promise + + export interface Type { - id: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - enumAnnotation: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => EnumAnnotation | Promise; - - enumAsUnionType: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => EnumAsUnionType | Promise; + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + enumAnnotation: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => EnumAnnotation | Promise + + + enumAsUnionType: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => EnumAsUnionType | Promise + } -} + + + } + + + export interface Resolvers { - Query: QueryResolvers.Type; - User: UserResolvers.Type; + Query: QueryResolvers.Type +User: UserResolvers.Type } -" + + + " `; exports[`basic enum 2`] = ` @@ -164,115 +225,162 @@ export const resolvers: Resolvers = { `; exports[`basic input 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import { GraphQLResolveInfo } from \\"graphql\\"; -import { AddMemberPayload } from \\"../../../fixtures/input/types\\"; -type Context = any; +import { GraphQLResolveInfo } from 'graphql' +import { AddMemberPayload } from '../../../fixtures/input/types' +type Context = any + + + -export namespace MutationResolvers { - export const defaultResolvers = {}; + export namespace MutationResolvers { - export interface AddMemberData { - email: string; - projects: string[]; - sideProjects: string[] | null; - profile: ProfileData | null; - phones: PhoneData[] | null; - } - export interface ProfileData { - firstName: string | null; - lastName: string | null; - photo: Photo | null; - } - export interface Photo { - title: string; - url: string; - } - export interface PhoneData { - number: string; - } + export const defaultResolvers = {} + + export interface AddMemberData { + email: string,projects: string[],sideProjects: string[]| null,profile: ProfileData| null,phones: PhoneData[]| null + } +export interface ProfileData { + firstName: string| null,lastName: string| null,photo: Photo| null + } +export interface Photo { + title: string,url: string + } +export interface PhoneData { + number: string + } + export interface ArgsAddMember { - data: AddMemberData; + data: AddMemberData } + export interface ArgsAddMembers { - data: AddMemberData[]; + data: AddMemberData[] } + - export type AddMemberResolver = ( + + export type AddMemberResolver = + ( parent: undefined, args: ArgsAddMember, ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + - export type AddMembersResolver = ( + export type AddMembersResolver = + ( parent: undefined, args: ArgsAddMembers, ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + + export interface Type { - addMember: ( - parent: undefined, - args: ArgsAddMember, - ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; - - addMembers: ( - parent: undefined, - args: ArgsAddMembers, - ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; + + addMember: + ( + parent: undefined, + args: ArgsAddMember, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + + + addMembers: + ( + parent: undefined, + args: ArgsAddMembers, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + } -} + -export namespace AddMemberPayloadResolvers { - export const defaultResolvers = { - newUserId: (parent: AddMemberPayload) => parent.newUserId - }; + + } + + export namespace AddMemberPayloadResolvers { + + export const defaultResolvers = { + newUserId: (parent: AddMemberPayload) => parent.newUserId, + } - export type NewUserIdResolver = ( + + + + + + + export type NewUserIdResolver = + ( parent: AddMemberPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - export type ExistingUserInviteSentResolver = ( + export type ExistingUserInviteSentResolver = + ( parent: AddMemberPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + + export interface Type { - newUserId: ( - parent: AddMemberPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - existingUserInviteSent: ( - parent: AddMemberPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + + newUserId: + ( + parent: AddMemberPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + existingUserInviteSent: + ( + parent: AddMemberPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + } -} + + + + } + + export interface Resolvers { - Mutation: MutationResolvers.Type; - AddMemberPayload: AddMemberPayloadResolvers.Type; + Mutation: MutationResolvers.Type +AddMemberPayload: AddMemberPayloadResolvers.Type } -" + + + " `; exports[`basic input 2`] = ` @@ -334,68 +442,107 @@ export const resolvers: Resolvers = { `; exports[`basic scalar 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. -import { GraphQLResolveInfo } from \\"graphql\\"; -import { AddMemberPayload } from \\"../../../fixtures/scalar/types\\"; -type Context = any; +import { GraphQLResolveInfo } from 'graphql' +import { AddMemberPayload } from '../../../fixtures/scalar/types' +type Context = any + + + -export namespace MutationResolvers { - export const defaultResolvers = {}; + export namespace MutationResolvers { - export interface AddMemberData { - email: string; - projects: string[]; - } + export const defaultResolvers = {} + + export interface AddMemberData { + email: string,projects: string[] + } + export interface ArgsAddMember { - data: AddMemberData; + data: AddMemberData } + - export type AddMemberResolver = ( + + export type AddMemberResolver = + ( parent: undefined, args: ArgsAddMember, ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + + export interface Type { - addMember: ( - parent: undefined, - args: ArgsAddMember, - ctx: Context, - info: GraphQLResolveInfo - ) => AddMemberPayload | Promise; + + addMember: + ( + parent: undefined, + args: ArgsAddMember, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AddMemberPayload | Promise + } -} + + + + } + + export namespace AddMemberPayloadResolvers { + + export const defaultResolvers = { + json: (parent: AddMemberPayload) => parent.json, + } + + -export namespace AddMemberPayloadResolvers { - export const defaultResolvers = { - json: (parent: AddMemberPayload) => parent.json - }; + - export type JsonResolver = ( + + export type JsonResolver = + ( parent: AddMemberPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + + export interface Type { - json: ( - parent: AddMemberPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + + json: + ( + parent: AddMemberPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + } -} + + + } + + + export interface Resolvers { - Mutation: MutationResolvers.Type; - AddMemberPayload: AddMemberPayloadResolvers.Type; + Mutation: MutationResolvers.Type +AddMemberPayload: AddMemberPayloadResolvers.Type } -" + + + " `; exports[`basic scalar 2`] = ` @@ -450,258 +597,391 @@ export const resolvers: Resolvers = { `; exports[`basic schema 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { Number } from '../../../fixtures/basic' +type Context = any + + + + + export namespace QueryResolvers { + + export const defaultResolvers = {} + + + + + + -import { GraphQLResolveInfo } from \\"graphql\\"; -import { Number } from \\"../../../fixtures/basic\\"; -type Context = any; -export namespace QueryResolvers { - export const defaultResolvers = {}; export interface ArgsCustom_with_arg { - id: number; + id: number } + export interface ArgsCustom_with_custom_arg { - id: Number; + id: Number } + + + + + export interface ArgsScalar_with_arg { - id: number; + id: number } + export interface ArgsScalar_with_custom_arg { - id: Number; + id: Number } + - export type IdResolver = ( + + export type IdResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type Custom_requiredResolver = ( + export type Custom_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - export type Custom_nullableResolver = ( + export type Custom_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number | null | Promise; + info: GraphQLResolveInfo, + ) + => Number| null | Promise + - export type Custom_array_nullableResolver = ( + export type Custom_array_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | null | Promise; + info: GraphQLResolveInfo, + ) + => Number[]| null | Promise + - export type Custom_array_requiredResolver = ( + export type Custom_array_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | Promise; + info: GraphQLResolveInfo, + ) + => Number[] | Promise + - export type Custom_with_argResolver = ( + export type Custom_with_argResolver = + ( parent: undefined, args: ArgsCustom_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - export type Custom_with_custom_argResolver = ( + export type Custom_with_custom_argResolver = + ( parent: undefined, args: ArgsCustom_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - export type Scalar_requiredResolver = ( + export type Scalar_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type Scalar_nullableResolver = ( + export type Scalar_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type Scalar_array_nullableResolver = ( + export type Scalar_array_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + - export type Scalar_array_requiredResolver = ( + export type Scalar_array_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + - export type Scalar_with_argResolver = ( + export type Scalar_with_argResolver = + ( parent: undefined, args: ArgsScalar_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type Scalar_with_custom_argResolver = ( + export type Scalar_with_custom_argResolver = + ( parent: undefined, args: ArgsScalar_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + export interface Type { - id: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - custom_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; - - custom_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | null | Promise; - - custom_array_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | null | Promise; - - custom_array_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | Promise; - - custom_with_arg: ( - parent: undefined, - args: ArgsCustom_with_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; - - custom_with_custom_arg: ( - parent: undefined, - args: ArgsCustom_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; - - scalar_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - scalar_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - scalar_array_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; - - scalar_array_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; - - scalar_with_arg: ( - parent: undefined, - args: ArgsScalar_with_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - scalar_with_custom_arg: ( - parent: undefined, - args: ArgsScalar_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + + id: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + custom_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number | Promise + + + custom_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number| null | Promise + + + custom_array_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number[]| null | Promise + + + custom_array_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number[] | Promise + + + custom_with_arg: + ( + parent: undefined, + args: ArgsCustom_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number | Promise + + + custom_with_custom_arg: + ( + parent: undefined, + args: ArgsCustom_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number | Promise + + + scalar_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + scalar_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + + + scalar_array_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + + + scalar_array_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + + + scalar_with_arg: + ( + parent: undefined, + args: ArgsScalar_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + scalar_with_custom_arg: + ( + parent: undefined, + args: ArgsScalar_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + } -} + -export namespace NumberResolvers { - export const defaultResolvers = { + + } + + export namespace NumberResolvers { + + export const defaultResolvers = { id: (parent: Number) => parent.id, - value: (parent: Number) => parent.value - }; +value: (parent: Number) => parent.value, + } - export type IdResolver = ( + + + + + + + export type IdResolver = + ( parent: Number, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - export type ValueResolver = ( + export type ValueResolver = + ( parent: Number, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + + export interface Type { - id: ( - parent: Number, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - value: ( - parent: Number, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + + id: + ( + parent: Number, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + value: + ( + parent: Number, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + } -} + + + + } + + export interface Resolvers { - Query: QueryResolvers.Type; - Number: NumberResolvers.Type; + Query: QueryResolvers.Type +Number: NumberResolvers.Type } -" + + + " `; exports[`basic schema 2`] = ` @@ -792,113 +1072,186 @@ export const resolvers: Resolvers = { `; exports[`basic union 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { User, Student, Professor } from '../../../fixtures/union/types' +type Context = any + + + -import { GraphQLResolveInfo } from \\"graphql\\"; -import { User, Student, Professor } from \\"../../../fixtures/union/types\\"; -type Context = any; + export namespace UserResolvers { -export namespace UserResolvers { - export const defaultResolvers = { + export const defaultResolvers = { id: (parent: User) => parent.id, - name: (parent: User) => parent.name - }; +name: (parent: User) => parent.name, + } + + + + + - export type IdResolver = ( + + + export type IdResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type NameResolver = ( + export type NameResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type TypeResolver = ( + export type TypeResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => {} | Promise<{}>; + info: GraphQLResolveInfo, + ) + => {} | Promise<{}> + + export interface Type { - id: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - type: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => {} | Promise<{}>; + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + type: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => {} | Promise<{}> + } -} + -export namespace StudentResolvers { - export const defaultResolvers = { - age: (parent: Student) => parent.age - }; + + } + + export namespace StudentResolvers { + + export const defaultResolvers = { + age: (parent: Student) => parent.age, + } + + - export type AgeResolver = ( + + + + export type AgeResolver = + ( parent: Student, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + + export interface Type { - age: ( - parent: Student, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + + age: + ( + parent: Student, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace ProfessorResolvers { + + export const defaultResolvers = { + degree: (parent: Professor) => parent.degree, } -} -export namespace ProfessorResolvers { - export const defaultResolvers = { - degree: (parent: Professor) => parent.degree - }; + - export type DegreeResolver = ( + + + + export type DegreeResolver = + ( parent: Professor, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + + export interface Type { - degree: ( - parent: Professor, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + + degree: + ( + parent: Professor, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + } -} + + + + } + + export interface Resolvers { - User: UserResolvers.Type; - Student: StudentResolvers.Type; - Professor: ProfessorResolvers.Type; + User: UserResolvers.Type +Student: StudentResolvers.Type +Professor: ProfessorResolvers.Type } -" + + + " `; exports[`basic union 2`] = ` @@ -969,59 +1322,101 @@ export const resolvers: Resolvers = { `; exports[`context 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { User } from '../../../fixtures/context/types' +import { Context } from '../../../fixtures/context/types' + + + + + export namespace QueryResolvers { -import { GraphQLResolveInfo } from \\"graphql\\"; -import { User } from \\"../../../fixtures/context/types\\"; -import { Context } from \\"../../../fixtures/context/types\\"; + export const defaultResolvers = {} -export namespace QueryResolvers { - export const defaultResolvers = {}; + - export type CreateUserResolver = ( + + + + export type CreateUserResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | null | Promise; + info: GraphQLResolveInfo, + ) + => User| null | Promise + + export interface Type { - createUser: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | null | Promise; + + createUser: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User| null | Promise + + } + + + + } + + export namespace UserResolvers { + + export const defaultResolvers = { + id: (parent: User) => parent.id, } -} -export namespace UserResolvers { - export const defaultResolvers = { - id: (parent: User) => parent.id - }; + - export type IdResolver = ( + + + + export type IdResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + export interface Type { - id: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + } -} + + + + } + + export interface Resolvers { - Query: QueryResolvers.Type; - User: UserResolvers.Type; + Query: QueryResolvers.Type +User: UserResolvers.Type } -" + + + " `; exports[`context 2`] = ` @@ -1076,258 +1471,391 @@ export const resolvers: Resolvers = { `; exports[`defaultName 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { NumberNode } from '../../../fixtures/defaultName' +type Context = any + + + + + export namespace QueryResolvers { + + export const defaultResolvers = {} + + + + + + -import { GraphQLResolveInfo } from \\"graphql\\"; -import { NumberNode } from \\"../../../fixtures/defaultName\\"; -type Context = any; -export namespace QueryResolvers { - export const defaultResolvers = {}; export interface ArgsCustom_with_arg { - id: number; + id: number } + export interface ArgsCustom_with_custom_arg { - id: NumberNode; + id: NumberNode } + + + + + export interface ArgsScalar_with_arg { - id: number; + id: number } + export interface ArgsScalar_with_custom_arg { - id: NumberNode; + id: NumberNode } + - export type IdResolver = ( + + export type IdResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type Custom_requiredResolver = ( + export type Custom_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + - export type Custom_nullableResolver = ( + export type Custom_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | null | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode| null | Promise + - export type Custom_array_nullableResolver = ( + export type Custom_array_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode[] | null | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode[]| null | Promise + - export type Custom_array_requiredResolver = ( + export type Custom_array_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode[] | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode[] | Promise + - export type Custom_with_argResolver = ( + export type Custom_with_argResolver = + ( parent: undefined, args: ArgsCustom_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + - export type Custom_with_custom_argResolver = ( + export type Custom_with_custom_argResolver = + ( parent: undefined, args: ArgsCustom_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + - export type Scalar_requiredResolver = ( + export type Scalar_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type Scalar_nullableResolver = ( + export type Scalar_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type Scalar_array_nullableResolver = ( + export type Scalar_array_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + - export type Scalar_array_requiredResolver = ( + export type Scalar_array_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + - export type Scalar_with_argResolver = ( + export type Scalar_with_argResolver = + ( parent: undefined, args: ArgsScalar_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type Scalar_with_custom_argResolver = ( + export type Scalar_with_custom_argResolver = + ( parent: undefined, args: ArgsScalar_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + export interface Type { - id: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - custom_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; - - custom_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | null | Promise; - - custom_array_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode[] | null | Promise; - - custom_array_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode[] | Promise; - - custom_with_arg: ( - parent: undefined, - args: ArgsCustom_with_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; - - custom_with_custom_arg: ( - parent: undefined, - args: ArgsCustom_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => NumberNode | Promise; - - scalar_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - scalar_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - scalar_array_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; - - scalar_array_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; - - scalar_with_arg: ( - parent: undefined, - args: ArgsScalar_with_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - scalar_with_custom_arg: ( - parent: undefined, - args: ArgsScalar_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + + id: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + custom_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + + + custom_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NumberNode| null | Promise + + + custom_array_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NumberNode[]| null | Promise + + + custom_array_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NumberNode[] | Promise + + + custom_with_arg: + ( + parent: undefined, + args: ArgsCustom_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + + + custom_with_custom_arg: + ( + parent: undefined, + args: ArgsCustom_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NumberNode | Promise + + + scalar_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + scalar_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + + + scalar_array_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + + + scalar_array_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + + + scalar_with_arg: + ( + parent: undefined, + args: ArgsScalar_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + scalar_with_custom_arg: + ( + parent: undefined, + args: ArgsScalar_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + } -} + + + + } + + export namespace NumberResolvers { -export namespace NumberResolvers { - export const defaultResolvers = { + export const defaultResolvers = { id: (parent: NumberNode) => parent.id, - value: (parent: NumberNode) => parent.value - }; +value: (parent: NumberNode) => parent.value, + } + + + + - export type IdResolver = ( + + + export type IdResolver = + ( parent: NumberNode, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - export type ValueResolver = ( + export type ValueResolver = + ( parent: NumberNode, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + + export interface Type { - id: ( - parent: NumberNode, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - value: ( - parent: NumberNode, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + + id: + ( + parent: NumberNode, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + value: + ( + parent: NumberNode, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + } -} + + + } + + + export interface Resolvers { - Query: QueryResolvers.Type; - Number: NumberResolvers.Type; + Query: QueryResolvers.Type +Number: NumberResolvers.Type } -" + + + " `; exports[`defaultName 2`] = ` @@ -1418,258 +1946,391 @@ export const resolvers: Resolvers = { `; exports[`override model 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { Number } from '../../../fixtures/basic' +type Context = any + + + + + export namespace QueryResolvers { + + export const defaultResolvers = {} + + + + + + -import { GraphQLResolveInfo } from \\"graphql\\"; -import { Number } from \\"../../../fixtures/basic\\"; -type Context = any; -export namespace QueryResolvers { - export const defaultResolvers = {}; export interface ArgsCustom_with_arg { - id: number; + id: number } + export interface ArgsCustom_with_custom_arg { - id: Number; + id: Number } + + + + + export interface ArgsScalar_with_arg { - id: number; + id: number } + export interface ArgsScalar_with_custom_arg { - id: Number; + id: Number } + - export type IdResolver = ( + + export type IdResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type Custom_requiredResolver = ( + export type Custom_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - export type Custom_nullableResolver = ( + export type Custom_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number | null | Promise; + info: GraphQLResolveInfo, + ) + => Number| null | Promise + - export type Custom_array_nullableResolver = ( + export type Custom_array_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | null | Promise; + info: GraphQLResolveInfo, + ) + => Number[]| null | Promise + - export type Custom_array_requiredResolver = ( + export type Custom_array_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | Promise; + info: GraphQLResolveInfo, + ) + => Number[] | Promise + - export type Custom_with_argResolver = ( + export type Custom_with_argResolver = + ( parent: undefined, args: ArgsCustom_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - export type Custom_with_custom_argResolver = ( + export type Custom_with_custom_argResolver = + ( parent: undefined, args: ArgsCustom_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; + info: GraphQLResolveInfo, + ) + => Number | Promise + - export type Scalar_requiredResolver = ( + export type Scalar_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type Scalar_nullableResolver = ( + export type Scalar_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type Scalar_array_nullableResolver = ( + export type Scalar_array_nullableResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + - export type Scalar_array_requiredResolver = ( + export type Scalar_array_requiredResolver = + ( parent: undefined, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + - export type Scalar_with_argResolver = ( + export type Scalar_with_argResolver = + ( parent: undefined, args: ArgsScalar_with_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type Scalar_with_custom_argResolver = ( + export type Scalar_with_custom_argResolver = + ( parent: undefined, args: ArgsScalar_with_custom_arg, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + export interface Type { - id: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - custom_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; - - custom_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | null | Promise; - - custom_array_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | null | Promise; - - custom_array_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Number[] | Promise; - - custom_with_arg: ( - parent: undefined, - args: ArgsCustom_with_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; - - custom_with_custom_arg: ( - parent: undefined, - args: ArgsCustom_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => Number | Promise; - - scalar_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - scalar_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - scalar_array_nullable: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | null | Promise; - - scalar_array_required: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean[] | Promise; - - scalar_with_arg: ( - parent: undefined, - args: ArgsScalar_with_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - scalar_with_custom_arg: ( - parent: undefined, - args: ArgsScalar_with_custom_arg, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + + id: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + custom_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number | Promise + + + custom_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number| null | Promise + + + custom_array_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number[]| null | Promise + + + custom_array_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number[] | Promise + + + custom_with_arg: + ( + parent: undefined, + args: ArgsCustom_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number | Promise + + + custom_with_custom_arg: + ( + parent: undefined, + args: ArgsCustom_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Number | Promise + + + scalar_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + scalar_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + + + scalar_array_nullable: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean[]| null | Promise + + + scalar_array_required: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean[] | Promise + + + scalar_with_arg: + ( + parent: undefined, + args: ArgsScalar_with_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + scalar_with_custom_arg: + ( + parent: undefined, + args: ArgsScalar_with_custom_arg, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + } -} + + + + } + + export namespace NumberResolvers { -export namespace NumberResolvers { - export const defaultResolvers = { + export const defaultResolvers = { id: (parent: Number) => parent.id, - value: (parent: Number) => parent.value - }; +value: (parent: Number) => parent.value, + } + + + + + - export type IdResolver = ( + + export type IdResolver = + ( parent: Number, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - export type ValueResolver = ( + export type ValueResolver = + ( parent: Number, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + + export interface Type { - id: ( - parent: Number, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - value: ( - parent: Number, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + + id: + ( + parent: Number, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + value: + ( + parent: Number, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + } -} + + + + } + + export interface Resolvers { - Query: QueryResolvers.Type; - Number: NumberResolvers.Type; + Query: QueryResolvers.Type +Number: NumberResolvers.Type } -" + + + " `; exports[`override model 2`] = ` @@ -1760,75 +2421,121 @@ export const resolvers: Resolvers = { `; exports[`subscription 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. - -import { GraphQLResolveInfo } from \\"graphql\\"; -import { User } from \\"../../../fixtures/subscription/types\\"; -type Context = any; - -export namespace SubscriptionResolvers { - export const defaultResolvers = {}; - - export type SubscribeToUserResolver = { - subscribe: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => AsyncIterator | Promise>; - resolve?: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; - }; +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { User } from '../../../fixtures/subscription/types' +type Context = any + + + + + export namespace SubscriptionResolvers { + + export const defaultResolvers = {} + + + + + + + export type SubscribeToUserResolver = { + subscribe: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AsyncIterator | Promise> + resolve?: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + } + + export interface Type { + subscribeToUser: { - subscribe: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => AsyncIterator | Promise>; - resolve?: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; - }; + subscribe: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AsyncIterator | Promise> + resolve?: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + } + } -} + -export namespace UserResolvers { - export const defaultResolvers = { - name: (parent: User) => parent.name - }; + + } + + export namespace UserResolvers { + + export const defaultResolvers = { + name: (parent: User) => parent.name, + } - export type NameResolver = ( + + + + + + export type NameResolver = + ( parent: User, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + export interface Type { - name: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + + name: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + } -} + + + } + + + export interface Resolvers { - Subscription: SubscriptionResolvers.Type; - User: UserResolvers.Type; + Subscription: SubscriptionResolvers.Type +User: UserResolvers.Type } -" + + + " `; exports[`subscription 2`] = ` diff --git a/packages/graphqlgen/src/tests/typescript/__snapshots__/large-schema.test.ts.snap b/packages/graphqlgen/src/tests/typescript/__snapshots__/large-schema.test.ts.snap index a217cfa8..a7d15c5f 100644 --- a/packages/graphqlgen/src/tests/typescript/__snapshots__/large-schema.test.ts.snap +++ b/packages/graphqlgen/src/tests/typescript/__snapshots__/large-schema.test.ts.snap @@ -1,3866 +1,5719 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`large schema tests large schema 1`] = ` -"// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. +" +// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. + +import { GraphQLResolveInfo } from 'graphql' +import { Experience, ExperienceCategory, Location, Review, Picture, Home, Reservation, Neighbourhood, City, ExperiencesByCity, Viewer, User, Booking, Place, Amenities, Pricing, PlaceViews, GuestRequirements, Policies, HouseRules, Payment, PaymentAccount, PaypalInformation, CreditCardInformation, Notification, Message, AuthPayload, MutationResult } from '../../../fixtures/prisma/types' +type Context = any + + + type PLACE_SIZES = 'ENTIRE_HOUSE' | 'ENTIRE_APARTMENT' | 'ENTIRE_EARTH_HOUSE' | 'ENTIRE_CABIN' | 'ENTIRE_VILLA' | 'ENTIRE_PLACE' | 'ENTIRE_BOAT' | 'PRIVATE_ROOM' +type CURRENCY = 'CAD' | 'CHF' | 'EUR' | 'JPY' | 'USD' | 'ZAR' +type PAYMENT_PROVIDER = 'PAYPAL' | 'CREDIT_CARD' +type NOTIFICATION_TYPE = 'OFFER' | 'INSTANT_BOOK' | 'RESPONSIVENESS' | 'NEW_AMENITIES' | 'HOUSE_RULES' + + export namespace QueryResolvers { + + export const defaultResolvers = {} + + + + -import { GraphQLResolveInfo } from \\"graphql\\"; -import { - Experience, - ExperienceCategory, - Location, - Review, - Picture, - Home, - Reservation, - Neighbourhood, - City, - ExperiencesByCity, - Viewer, - User, - Booking, - Place, - Amenities, - Pricing, - PlaceViews, - GuestRequirements, - Policies, - HouseRules, - Payment, - PaymentAccount, - PaypalInformation, - CreditCardInformation, - Notification, - Message, - AuthPayload, - MutationResult -} from \\"../../../fixtures/prisma/types\\"; -type Context = any; - -type PLACE_SIZES = - | \\"ENTIRE_HOUSE\\" - | \\"ENTIRE_APARTMENT\\" - | \\"ENTIRE_EARTH_HOUSE\\" - | \\"ENTIRE_CABIN\\" - | \\"ENTIRE_VILLA\\" - | \\"ENTIRE_PLACE\\" - | \\"ENTIRE_BOAT\\" - | \\"PRIVATE_ROOM\\"; -type CURRENCY = \\"CAD\\" | \\"CHF\\" | \\"EUR\\" | \\"JPY\\" | \\"USD\\" | \\"ZAR\\"; -type PAYMENT_PROVIDER = \\"PAYPAL\\" | \\"CREDIT_CARD\\"; -type NOTIFICATION_TYPE = - | \\"OFFER\\" - | \\"INSTANT_BOOK\\" - | \\"RESPONSIVENESS\\" - | \\"NEW_AMENITIES\\" - | \\"HOUSE_RULES\\"; - -export namespace QueryResolvers { - export const defaultResolvers = {}; export interface ArgsHomesInPriceRange { - min: number; - max: number; + min: number +max: number + } + + + + + export interface ArgsExperiencesByCity { + cities: string[] + } + + + + + + export type TopExperiencesResolver = + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + export type TopHomesResolver = + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Home[] | Promise + + + export type HomesInPriceRangeResolver = + ( + parent: undefined, + args: ArgsHomesInPriceRange, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Home[] | Promise + + + export type TopReservationsResolver = + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Reservation[] | Promise + + + export type FeaturedDestinationsResolver = + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Neighbourhood[] | Promise + + + export type ExperiencesByCityResolver = + ( + parent: undefined, + args: ArgsExperiencesByCity, + ctx: Context, + info: GraphQLResolveInfo, + ) + => ExperiencesByCity[] | Promise + + + export type ViewerResolver = + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Viewer| null | Promise + + + export type MyLocationResolver = + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location| null | Promise + + + + export interface Type { + + topExperiences: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + topHomes: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Home[] | Promise + + + homesInPriceRange: + ( + parent: undefined, + args: ArgsHomesInPriceRange, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Home[] | Promise + + + topReservations: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Reservation[] | Promise + + + featuredDestinations: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Neighbourhood[] | Promise + + + experiencesByCity: + ( + parent: undefined, + args: ArgsExperiencesByCity, + ctx: Context, + info: GraphQLResolveInfo, + ) + => ExperiencesByCity[] | Promise + + + viewer: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Viewer| null | Promise + + + myLocation: + ( + parent: undefined, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location| null | Promise + + } + + + + } + + export namespace ExperienceResolvers { + + export const defaultResolvers = { + id: (parent: Experience) => parent.id, +category: (parent: Experience) => parent.category === undefined ? null : parent.category, +title: (parent: Experience) => parent.title, +location: (parent: Experience) => parent.location, +pricePerPerson: (parent: Experience) => parent.pricePerPerson, +reviews: (parent: Experience) => parent.reviews, +preview: (parent: Experience) => parent.preview, +popularity: (parent: Experience) => parent.popularity, + } + + + + + + + + + + + + + + export type IdResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type CategoryResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => ExperienceCategory| null | Promise + + + export type TitleResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type LocationResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type PricePerPersonResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type ReviewsResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Review[] | Promise + + + export type PreviewResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture | Promise + + + export type PopularityResolver = + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Type { + + id: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + category: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => ExperienceCategory| null | Promise + + + title: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + location: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + pricePerPerson: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + reviews: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Review[] | Promise + + + preview: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture | Promise + + + popularity: + ( + parent: Experience, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace ExperienceCategoryResolvers { + + export const defaultResolvers = { + id: (parent: ExperienceCategory) => parent.id, +mainColor: (parent: ExperienceCategory) => parent.mainColor, +name: (parent: ExperienceCategory) => parent.name, +experience: (parent: ExperienceCategory) => parent.experience === undefined ? null : parent.experience, + } + + + + + + + + + + export type IdResolver = + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type MainColorResolver = + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type NameResolver = + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type ExperienceResolver = + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience| null | Promise + + + + export interface Type { + + id: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + mainColor: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + experience: + ( + parent: ExperienceCategory, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience| null | Promise + + } + + + } + + export namespace LocationResolvers { + + export const defaultResolvers = { + id: (parent: Location) => parent.id, +lat: (parent: Location) => parent.lat, +lng: (parent: Location) => parent.lng, +address: (parent: Location) => parent.address === undefined ? null : parent.address, +directions: (parent: Location) => parent.directions === undefined ? null : parent.directions, + } + + + + + + + + + + + export type IdResolver = + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type LatResolver = + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type LngResolver = + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type AddressResolver = + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + export type DirectionsResolver = + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + + export interface Type { + + id: + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + lat: + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + lng: + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + address: + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + directions: + ( + parent: Location, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + } + + + + } + + export namespace ReviewResolvers { + + export const defaultResolvers = { + accuracy: (parent: Review) => parent.accuracy, +checkIn: (parent: Review) => parent.checkIn, +cleanliness: (parent: Review) => parent.cleanliness, +communication: (parent: Review) => parent.communication, +createdAt: (parent: Review) => parent.createdAt, +id: (parent: Review) => parent.id, +location: (parent: Review) => parent.location, +stars: (parent: Review) => parent.stars, +text: (parent: Review) => parent.text, +value: (parent: Review) => parent.value, + } + + + + + + + + + + + + + + + + export type AccuracyResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type CheckInResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type CleanlinessResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type CommunicationResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type CreatedAtResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type IdResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type LocationResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type StarsResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type TextResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type ValueResolver = + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Type { + + accuracy: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + checkIn: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + cleanliness: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + communication: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + createdAt: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + id: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + location: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + stars: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + text: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + value: + ( + parent: Review, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace PictureResolvers { + + export const defaultResolvers = { + id: (parent: Picture) => parent.id, +url: (parent: Picture) => parent.url, + } + + + + + + + + export type IdResolver = + ( + parent: Picture, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type UrlResolver = + ( + parent: Picture, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface Type { + + id: + ( + parent: Picture, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + url: + ( + parent: Picture, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + } + + + + } + + export namespace HomeResolvers { + + export const defaultResolvers = { + id: (parent: Home) => parent.id, +name: (parent: Home) => parent.name === undefined ? null : parent.name, +description: (parent: Home) => parent.description, +numRatings: (parent: Home) => parent.numRatings, +avgRating: (parent: Home) => parent.avgRating === undefined ? null : parent.avgRating, +pictures: (parent: Home) => parent.pictures, +perNight: (parent: Home) => parent.perNight, + } + + + + + + + + + + export interface ArgsPictures { + first: number| null + } + + + + + export type IdResolver = + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type NameResolver = + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + export type DescriptionResolver = + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type NumRatingsResolver = + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type AvgRatingResolver = + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + export type PicturesResolver = + ( + parent: Home, + args: ArgsPictures, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + export type PerNightResolver = + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Type { + + id: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + description: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + numRatings: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + avgRating: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + pictures: + ( + parent: Home, + args: ArgsPictures, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + perNight: + ( + parent: Home, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace ReservationResolvers { + + export const defaultResolvers = { + id: (parent: Reservation) => parent.id, +title: (parent: Reservation) => parent.title, +avgPricePerPerson: (parent: Reservation) => parent.avgPricePerPerson, +pictures: (parent: Reservation) => parent.pictures, +location: (parent: Reservation) => parent.location, +isCurated: (parent: Reservation) => parent.isCurated, +slug: (parent: Reservation) => parent.slug, +popularity: (parent: Reservation) => parent.popularity, + } + + + + + + + + + + + + + + export type IdResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type TitleResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type AvgPricePerPersonResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type PicturesResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + export type LocationResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type IsCuratedResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type SlugResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type PopularityResolver = + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Type { + + id: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + title: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + avgPricePerPerson: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + pictures: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + location: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + isCurated: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + slug: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + popularity: + ( + parent: Reservation, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace NeighbourhoodResolvers { + + export const defaultResolvers = { + id: (parent: Neighbourhood) => parent.id, +name: (parent: Neighbourhood) => parent.name, +slug: (parent: Neighbourhood) => parent.slug, +homePreview: (parent: Neighbourhood) => parent.homePreview === undefined ? null : parent.homePreview, +city: (parent: Neighbourhood) => parent.city, +featured: (parent: Neighbourhood) => parent.featured, +popularity: (parent: Neighbourhood) => parent.popularity, + } + + + + + + + + + + + + + export type IdResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type NameResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type SlugResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type HomePreviewResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture| null | Promise + + + export type CityResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => City | Promise + + + export type FeaturedResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type PopularityResolver = + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Type { + + id: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + slug: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + homePreview: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture| null | Promise + + + city: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => City | Promise + + + featured: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + popularity: + ( + parent: Neighbourhood, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace CityResolvers { + + export const defaultResolvers = { + id: (parent: City) => parent.id, +name: (parent: City) => parent.name, + } + + + + + + + + export type IdResolver = + ( + parent: City, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type NameResolver = + ( + parent: City, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface Type { + + id: + ( + parent: City, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: City, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + } + + + + } + + export namespace ExperiencesByCityResolvers { + + export const defaultResolvers = { + experiences: (parent: ExperiencesByCity) => parent.experiences, +city: (parent: ExperiencesByCity) => parent.city, + } + + + + + + + + export type ExperiencesResolver = + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + export type CityResolver = + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => City | Promise + + + + export interface Type { + + experiences: + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + city: + ( + parent: ExperiencesByCity, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => City | Promise + + } + + + + } + + export namespace ViewerResolvers { + + export const defaultResolvers = { + me: (parent: Viewer) => parent.me, +bookings: (parent: Viewer) => parent.bookings, + } + + + + + + + + export type MeResolver = + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + export type BookingsResolver = + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + + export interface Type { + + me: + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + bookings: + ( + parent: Viewer, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + } + + + + } + + export namespace UserResolvers { + + export const defaultResolvers = { + bookings: (parent: User) => parent.bookings, +createdAt: (parent: User) => parent.createdAt, +email: (parent: User) => parent.email, +firstName: (parent: User) => parent.firstName, +hostingExperiences: (parent: User) => parent.hostingExperiences, +id: (parent: User) => parent.id, +isSuperHost: (parent: User) => parent.isSuperHost, +lastName: (parent: User) => parent.lastName, +notifications: (parent: User) => parent.notifications, +ownedPlaces: (parent: User) => parent.ownedPlaces, +phone: (parent: User) => parent.phone, +profilePicture: (parent: User) => parent.profilePicture === undefined ? null : parent.profilePicture, +receivedMessages: (parent: User) => parent.receivedMessages, +responseRate: (parent: User) => parent.responseRate === undefined ? null : parent.responseRate, +responseTime: (parent: User) => parent.responseTime === undefined ? null : parent.responseTime, +sentMessages: (parent: User) => parent.sentMessages, +updatedAt: (parent: User) => parent.updatedAt, + } + + + + + + + + + + + + + + + + + + + + + + + + + + export type BookingsResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + export type CreatedAtResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type EmailResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type FirstNameResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type HostingExperiencesResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + export type IdResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type IsSuperHostResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + export type LastNameResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type LocationResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type NotificationsResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Notification[] | Promise + + + export type OwnedPlacesResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Place[] | Promise + + + export type PaymentAccountResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PaymentAccount[] | Promise + + + export type PhoneResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type ProfilePictureResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture| null | Promise + + + export type ReceivedMessagesResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Message[] | Promise + + + export type ResponseRateResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + export type ResponseTimeResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + export type SentMessagesResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Message[] | Promise + + + export type UpdatedAtResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type TokenResolver = + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + + export interface Type { + + bookings: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + createdAt: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + email: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + firstName: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + hostingExperiences: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Experience[] | Promise + + + id: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + isSuperHost: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + + + lastName: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + location: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + notifications: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Notification[] | Promise + + + ownedPlaces: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Place[] | Promise + + + paymentAccount: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PaymentAccount[] | Promise + + + phone: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + profilePicture: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture| null | Promise + + + receivedMessages: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Message[] | Promise + + + responseRate: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + responseTime: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number| null | Promise + + + sentMessages: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Message[] | Promise + + + updatedAt: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + token: + ( + parent: User, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + } + + + + } + + export namespace BookingResolvers { + + export const defaultResolvers = { + id: (parent: Booking) => parent.id, +createdAt: (parent: Booking) => parent.createdAt, +bookee: (parent: Booking) => parent.bookee, +place: (parent: Booking) => parent.place, +startDate: (parent: Booking) => parent.startDate, +endDate: (parent: Booking) => parent.endDate, +payment: (parent: Booking) => parent.payment, + } + + + + + + + + + + + + + export type IdResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type CreatedAtResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type BookeeResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + export type PlaceResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Place | Promise + + + export type StartDateResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type EndDateResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type PaymentResolver = + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Payment | Promise + + + + export interface Type { + + id: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + createdAt: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + bookee: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + place: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Place | Promise + + + startDate: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + endDate: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + payment: + ( + parent: Booking, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Payment | Promise + + } + + + + } + + export namespace PlaceResolvers { + + export const defaultResolvers = { + id: (parent: Place) => parent.id, +name: (parent: Place) => parent.name === undefined ? null : parent.name, +size: (parent: Place) => parent.size === undefined ? null : parent.size, +shortDescription: (parent: Place) => parent.shortDescription, +description: (parent: Place) => parent.description, +slug: (parent: Place) => parent.slug, +maxGuests: (parent: Place) => parent.maxGuests, +numBedrooms: (parent: Place) => parent.numBedrooms, +numBeds: (parent: Place) => parent.numBeds, +numBaths: (parent: Place) => parent.numBaths, +reviews: (parent: Place) => parent.reviews, +amenities: (parent: Place) => parent.amenities, +host: (parent: Place) => parent.host, +pricing: (parent: Place) => parent.pricing, +location: (parent: Place) => parent.location, +views: (parent: Place) => parent.views, +guestRequirements: (parent: Place) => parent.guestRequirements === undefined ? null : parent.guestRequirements, +policies: (parent: Place) => parent.policies === undefined ? null : parent.policies, +houseRules: (parent: Place) => parent.houseRules === undefined ? null : parent.houseRules, +bookings: (parent: Place) => parent.bookings, +pictures: (parent: Place) => parent.pictures, +popularity: (parent: Place) => parent.popularity, + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + export type IdResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type NameResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + export type SizeResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PLACE_SIZES| null | Promise + + + export type ShortDescriptionResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type DescriptionResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type SlugResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + export type MaxGuestsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type NumBedroomsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type NumBedsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type NumBathsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + export type ReviewsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Review[] | Promise + + + export type AmenitiesResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Amenities | Promise + + + export type HostResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + export type PricingResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Pricing | Promise + + + export type LocationResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + export type ViewsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PlaceViews | Promise + + + export type GuestRequirementsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => GuestRequirements| null | Promise + + + export type PoliciesResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Policies| null | Promise + + + export type HouseRulesResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => HouseRules| null | Promise + + + export type BookingsResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + export type PicturesResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + export type PopularityResolver = + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + + export interface Type { + + id: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + name: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string| null | Promise + + + size: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PLACE_SIZES| null | Promise + + + shortDescription: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + description: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + slug: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + maxGuests: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + numBedrooms: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + numBeds: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + numBaths: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + + reviews: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Review[] | Promise + + + amenities: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Amenities | Promise + + + host: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + + pricing: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Pricing | Promise + + + location: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Location | Promise + + + views: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PlaceViews | Promise + + + guestRequirements: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => GuestRequirements| null | Promise + + + policies: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Policies| null | Promise + + + houseRules: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => HouseRules| null | Promise + + + bookings: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Booking[] | Promise + + + pictures: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => Picture[] | Promise + + + popularity: + ( + parent: Place, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => number | Promise + + } + + + + } + + export namespace AmenitiesResolvers { + + export const defaultResolvers = { + airConditioning: (parent: Amenities) => parent.airConditioning, +babyBath: (parent: Amenities) => parent.babyBath, +babyMonitor: (parent: Amenities) => parent.babyMonitor, +babysitterRecommendations: (parent: Amenities) => parent.babysitterRecommendations, +bathtub: (parent: Amenities) => parent.bathtub, +breakfast: (parent: Amenities) => parent.breakfast, +buzzerWirelessIntercom: (parent: Amenities) => parent.buzzerWirelessIntercom, +cableTv: (parent: Amenities) => parent.cableTv, +changingTable: (parent: Amenities) => parent.changingTable, +childrensBooksAndToys: (parent: Amenities) => parent.childrensBooksAndToys, +childrensDinnerware: (parent: Amenities) => parent.childrensDinnerware, +crib: (parent: Amenities) => parent.crib, +doorman: (parent: Amenities) => parent.doorman, +dryer: (parent: Amenities) => parent.dryer, +elevator: (parent: Amenities) => parent.elevator, +essentials: (parent: Amenities) => parent.essentials, +familyKidFriendly: (parent: Amenities) => parent.familyKidFriendly, +freeParkingOnPremises: (parent: Amenities) => parent.freeParkingOnPremises, +freeParkingOnStreet: (parent: Amenities) => parent.freeParkingOnStreet, +gym: (parent: Amenities) => parent.gym, +hairDryer: (parent: Amenities) => parent.hairDryer, +hangers: (parent: Amenities) => parent.hangers, +heating: (parent: Amenities) => parent.heating, +hotTub: (parent: Amenities) => parent.hotTub, +id: (parent: Amenities) => parent.id, +indoorFireplace: (parent: Amenities) => parent.indoorFireplace, +internet: (parent: Amenities) => parent.internet, +iron: (parent: Amenities) => parent.iron, +kitchen: (parent: Amenities) => parent.kitchen, +laptopFriendlyWorkspace: (parent: Amenities) => parent.laptopFriendlyWorkspace, +paidParkingOffPremises: (parent: Amenities) => parent.paidParkingOffPremises, +petsAllowed: (parent: Amenities) => parent.petsAllowed, +pool: (parent: Amenities) => parent.pool, +privateEntrance: (parent: Amenities) => parent.privateEntrance, +shampoo: (parent: Amenities) => parent.shampoo, +smokingAllowed: (parent: Amenities) => parent.smokingAllowed, +suitableForEvents: (parent: Amenities) => parent.suitableForEvents, +tv: (parent: Amenities) => parent.tv, +washer: (parent: Amenities) => parent.washer, +wheelchairAccessible: (parent: Amenities) => parent.wheelchairAccessible, +wirelessInternet: (parent: Amenities) => parent.wirelessInternet, + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - export interface ArgsExperiencesByCity { - cities: string[]; - } - export type TopExperiencesResolver = ( - parent: undefined, + + export type AirConditioningResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type TopHomesResolver = ( - parent: undefined, + export type BabyBathResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Home[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type HomesInPriceRangeResolver = ( - parent: undefined, - args: ArgsHomesInPriceRange, + export type BabyMonitorResolver = + ( + parent: Amenities, + args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Home[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type TopReservationsResolver = ( - parent: undefined, + export type BabysitterRecommendationsResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Reservation[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type FeaturedDestinationsResolver = ( - parent: undefined, + export type BathtubResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Neighbourhood[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ExperiencesByCityResolver = ( - parent: undefined, - args: ArgsExperiencesByCity, + export type BreakfastResolver = + ( + parent: Amenities, + args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => ExperiencesByCity[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ViewerResolver = ( - parent: undefined, + export type BuzzerWirelessIntercomResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Viewer | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type MyLocationResolver = ( - parent: undefined, + export type CableTvResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | null | Promise; - - export interface Type { - topExperiences: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; - - topHomes: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Home[] | Promise; - - homesInPriceRange: ( - parent: undefined, - args: ArgsHomesInPriceRange, - ctx: Context, - info: GraphQLResolveInfo - ) => Home[] | Promise; - - topReservations: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Reservation[] | Promise; - - featuredDestinations: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Neighbourhood[] | Promise; - - experiencesByCity: ( - parent: undefined, - args: ArgsExperiencesByCity, - ctx: Context, - info: GraphQLResolveInfo - ) => ExperiencesByCity[] | Promise; - - viewer: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Viewer | null | Promise; - - myLocation: ( - parent: undefined, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Location | null | Promise; - } -} + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace ExperienceResolvers { - export const defaultResolvers = { - id: (parent: Experience) => parent.id, - category: (parent: Experience) => - parent.category === undefined ? null : parent.category, - title: (parent: Experience) => parent.title, - location: (parent: Experience) => parent.location, - pricePerPerson: (parent: Experience) => parent.pricePerPerson, - reviews: (parent: Experience) => parent.reviews, - preview: (parent: Experience) => parent.preview, - popularity: (parent: Experience) => parent.popularity - }; - - export type IdResolver = ( - parent: Experience, + export type ChangingTableResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CategoryResolver = ( - parent: Experience, + export type ChildrensBooksAndToysResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => ExperienceCategory | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type TitleResolver = ( - parent: Experience, + export type ChildrensDinnerwareResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LocationResolver = ( - parent: Experience, + export type CribResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PricePerPersonResolver = ( - parent: Experience, + export type DoormanResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ReviewsResolver = ( - parent: Experience, + export type DryerResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Review[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PreviewResolver = ( - parent: Experience, + export type ElevatorResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PopularityResolver = ( - parent: Experience, + export type EssentialsResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - export interface Type { - id: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - category: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => ExperienceCategory | null | Promise; - - title: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - location: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; - - pricePerPerson: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - reviews: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Review[] | Promise; - - preview: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture | Promise; - - popularity: ( - parent: Experience, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} - -export namespace ExperienceCategoryResolvers { - export const defaultResolvers = { - id: (parent: ExperienceCategory) => parent.id, - mainColor: (parent: ExperienceCategory) => parent.mainColor, - name: (parent: ExperienceCategory) => parent.name, - experience: (parent: ExperienceCategory) => - parent.experience === undefined ? null : parent.experience - }; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IdResolver = ( - parent: ExperienceCategory, + export type FamilyKidFriendlyResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type MainColorResolver = ( - parent: ExperienceCategory, + export type FreeParkingOnPremisesResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type NameResolver = ( - parent: ExperienceCategory, + export type FreeParkingOnStreetResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ExperienceResolver = ( - parent: ExperienceCategory, + export type GymResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export interface Type { - id: ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - mainColor: ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - experience: ( - parent: ExperienceCategory, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Experience | null | Promise; - } -} + export type HairDryerResolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace LocationResolvers { - export const defaultResolvers = { - id: (parent: Location) => parent.id, - lat: (parent: Location) => parent.lat, - lng: (parent: Location) => parent.lng, - address: (parent: Location) => - parent.address === undefined ? null : parent.address, - directions: (parent: Location) => - parent.directions === undefined ? null : parent.directions - }; - - export type IdResolver = ( - parent: Location, + export type HangersResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LatResolver = ( - parent: Location, + export type HeatingResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LngResolver = ( - parent: Location, + export type HotTubResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type AddressResolver = ( - parent: Location, + export type IdResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type DirectionsResolver = ( - parent: Location, + export type IndoorFireplaceResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export interface Type { - id: ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - lat: ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - lng: ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - address: ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - directions: ( - parent: Location, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - } -} + export type InternetResolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace ReviewResolvers { - export const defaultResolvers = { - accuracy: (parent: Review) => parent.accuracy, - checkIn: (parent: Review) => parent.checkIn, - cleanliness: (parent: Review) => parent.cleanliness, - communication: (parent: Review) => parent.communication, - createdAt: (parent: Review) => parent.createdAt, - id: (parent: Review) => parent.id, - location: (parent: Review) => parent.location, - stars: (parent: Review) => parent.stars, - text: (parent: Review) => parent.text, - value: (parent: Review) => parent.value - }; - - export type AccuracyResolver = ( - parent: Review, + export type IronResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CheckInResolver = ( - parent: Review, + export type KitchenResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CleanlinessResolver = ( - parent: Review, + export type LaptopFriendlyWorkspaceResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CommunicationResolver = ( - parent: Review, + export type PaidParkingOffPremisesResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CreatedAtResolver = ( - parent: Review, + export type PetsAllowedResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IdResolver = ( - parent: Review, + export type PoolResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LocationResolver = ( - parent: Review, + export type PrivateEntranceResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type StarsResolver = ( - parent: Review, + export type ShampooResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type TextResolver = ( - parent: Review, + export type SmokingAllowedResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ValueResolver = ( - parent: Review, + export type SuitableForEventsResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export interface Type { - accuracy: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - checkIn: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - cleanliness: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - communication: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - createdAt: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - location: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - stars: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - text: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - value: ( - parent: Review, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} + export type TvResolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace PictureResolvers { - export const defaultResolvers = { - id: (parent: Picture) => parent.id, - url: (parent: Picture) => parent.url - }; + export type WasherResolver = + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IdResolver = ( - parent: Picture, + export type WheelchairAccessibleResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type UrlResolver = ( - parent: Picture, + export type WirelessInternetResolver = + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + export interface Type { - id: ( - parent: Picture, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - url: ( - parent: Picture, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - } -} - -export namespace HomeResolvers { - export const defaultResolvers = { - id: (parent: Home) => parent.id, - name: (parent: Home) => (parent.name === undefined ? null : parent.name), - description: (parent: Home) => parent.description, - numRatings: (parent: Home) => parent.numRatings, - avgRating: (parent: Home) => - parent.avgRating === undefined ? null : parent.avgRating, - pictures: (parent: Home) => parent.pictures, - perNight: (parent: Home) => parent.perNight - }; - - export interface ArgsPictures { - first: number | null; - } - - export type IdResolver = ( - parent: Home, + + airConditioning: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type NameResolver = ( - parent: Home, + babyBath: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type DescriptionResolver = ( - parent: Home, + babyMonitor: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type NumRatingsResolver = ( - parent: Home, + babysitterRecommendations: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type AvgRatingResolver = ( - parent: Home, + bathtub: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PicturesResolver = ( - parent: Home, - args: ArgsPictures, + breakfast: + ( + parent: Amenities, + args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PerNightResolver = ( - parent: Home, + buzzerWirelessIntercom: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - export interface Type { - id: ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - description: ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - numRatings: ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - avgRating: ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - pictures: ( - parent: Home, - args: ArgsPictures, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; - - perNight: ( - parent: Home, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace ReservationResolvers { - export const defaultResolvers = { - id: (parent: Reservation) => parent.id, - title: (parent: Reservation) => parent.title, - avgPricePerPerson: (parent: Reservation) => parent.avgPricePerPerson, - pictures: (parent: Reservation) => parent.pictures, - location: (parent: Reservation) => parent.location, - isCurated: (parent: Reservation) => parent.isCurated, - slug: (parent: Reservation) => parent.slug, - popularity: (parent: Reservation) => parent.popularity - }; - - export type IdResolver = ( - parent: Reservation, + cableTv: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type TitleResolver = ( - parent: Reservation, + changingTable: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type AvgPricePerPersonResolver = ( - parent: Reservation, + childrensBooksAndToys: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PicturesResolver = ( - parent: Reservation, + childrensDinnerware: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LocationResolver = ( - parent: Reservation, + crib: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IsCuratedResolver = ( - parent: Reservation, + doorman: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type SlugResolver = ( - parent: Reservation, + dryer: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PopularityResolver = ( - parent: Reservation, + elevator: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export interface Type { - id: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - title: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - avgPricePerPerson: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - pictures: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; - - location: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; - - isCurated: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - slug: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - popularity: ( - parent: Reservation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} - -export namespace NeighbourhoodResolvers { - export const defaultResolvers = { - id: (parent: Neighbourhood) => parent.id, - name: (parent: Neighbourhood) => parent.name, - slug: (parent: Neighbourhood) => parent.slug, - homePreview: (parent: Neighbourhood) => - parent.homePreview === undefined ? null : parent.homePreview, - city: (parent: Neighbourhood) => parent.city, - featured: (parent: Neighbourhood) => parent.featured, - popularity: (parent: Neighbourhood) => parent.popularity - }; - - export type IdResolver = ( - parent: Neighbourhood, + essentials: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type NameResolver = ( - parent: Neighbourhood, + familyKidFriendly: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type SlugResolver = ( - parent: Neighbourhood, + freeParkingOnPremises: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type HomePreviewResolver = ( - parent: Neighbourhood, + freeParkingOnStreet: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture | null | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CityResolver = ( - parent: Neighbourhood, + gym: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => City | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type FeaturedResolver = ( - parent: Neighbourhood, + hairDryer: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type PopularityResolver = ( - parent: Neighbourhood, + hangers: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - export interface Type { - id: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - slug: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - homePreview: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture | null | Promise; - - city: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => City | Promise; - - featured: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - popularity: ( - parent: Neighbourhood, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} - -export namespace CityResolvers { - export const defaultResolvers = { - id: (parent: City) => parent.id, - name: (parent: City) => parent.name - }; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IdResolver = ( - parent: City, + heating: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type NameResolver = ( - parent: City, + hotTub: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - export interface Type { - id: ( - parent: City, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: City, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - } -} - -export namespace ExperiencesByCityResolvers { - export const defaultResolvers = { - experiences: (parent: ExperiencesByCity) => parent.experiences, - city: (parent: ExperiencesByCity) => parent.city - }; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ExperiencesResolver = ( - parent: ExperiencesByCity, + id: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CityResolver = ( - parent: ExperiencesByCity, + indoorFireplace: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => City | Promise; - - export interface Type { - experiences: ( - parent: ExperiencesByCity, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; - - city: ( - parent: ExperiencesByCity, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => City | Promise; - } -} + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace ViewerResolvers { - export const defaultResolvers = { - me: (parent: Viewer) => parent.me, - bookings: (parent: Viewer) => parent.bookings - }; + internet: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type MeResolver = ( - parent: Viewer, + iron: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type BookingsResolver = ( - parent: Viewer, + kitchen: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export interface Type { - me: ( - parent: Viewer, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; - - bookings: ( - parent: Viewer, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; - } -} + laptopFriendlyWorkspace: + ( + parent: Amenities, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + -export namespace UserResolvers { - export const defaultResolvers = { - bookings: (parent: User) => parent.bookings, - createdAt: (parent: User) => parent.createdAt, - email: (parent: User) => parent.email, - firstName: (parent: User) => parent.firstName, - hostingExperiences: (parent: User) => parent.hostingExperiences, - id: (parent: User) => parent.id, - isSuperHost: (parent: User) => parent.isSuperHost, - lastName: (parent: User) => parent.lastName, - notifications: (parent: User) => parent.notifications, - ownedPlaces: (parent: User) => parent.ownedPlaces, - phone: (parent: User) => parent.phone, - profilePicture: (parent: User) => - parent.profilePicture === undefined ? null : parent.profilePicture, - receivedMessages: (parent: User) => parent.receivedMessages, - responseRate: (parent: User) => - parent.responseRate === undefined ? null : parent.responseRate, - responseTime: (parent: User) => - parent.responseTime === undefined ? null : parent.responseTime, - sentMessages: (parent: User) => parent.sentMessages, - updatedAt: (parent: User) => parent.updatedAt - }; - - export type BookingsResolver = ( - parent: User, + paidParkingOffPremises: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CreatedAtResolver = ( - parent: User, + petsAllowed: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type EmailResolver = ( - parent: User, + pool: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type FirstNameResolver = ( - parent: User, + privateEntrance: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type HostingExperiencesResolver = ( - parent: User, + shampoo: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IdResolver = ( - parent: User, + smokingAllowed: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type IsSuperHostResolver = ( - parent: User, + suitableForEvents: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LastNameResolver = ( - parent: User, + tv: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type LocationResolver = ( - parent: User, + washer: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type NotificationsResolver = ( - parent: User, + wheelchairAccessible: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Notification[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type OwnedPlacesResolver = ( - parent: User, + wirelessInternet: + ( + parent: Amenities, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Place[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + } + + + + } + + export namespace PricingResolvers { + + export const defaultResolvers = { + averageMonthly: (parent: Pricing) => parent.averageMonthly, +averageWeekly: (parent: Pricing) => parent.averageWeekly, +basePrice: (parent: Pricing) => parent.basePrice, +cleaningFee: (parent: Pricing) => parent.cleaningFee === undefined ? null : parent.cleaningFee, +currency: (parent: Pricing) => parent.currency === undefined ? null : parent.currency, +extraGuests: (parent: Pricing) => parent.extraGuests === undefined ? null : parent.extraGuests, +id: (parent: Pricing) => parent.id, +monthlyDiscount: (parent: Pricing) => parent.monthlyDiscount === undefined ? null : parent.monthlyDiscount, +perNight: (parent: Pricing) => parent.perNight, +securityDeposit: (parent: Pricing) => parent.securityDeposit === undefined ? null : parent.securityDeposit, +smartPricing: (parent: Pricing) => parent.smartPricing, +weekendPricing: (parent: Pricing) => parent.weekendPricing === undefined ? null : parent.weekendPricing, +weeklyDiscount: (parent: Pricing) => parent.weeklyDiscount === undefined ? null : parent.weeklyDiscount, + } + + + + + + + + + + + + - export type PaymentAccountResolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount[] | Promise; - export type PhoneResolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - export type ProfilePictureResolver = ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture | null | Promise; - export type ReceivedMessagesResolver = ( - parent: User, + + + export type AverageMonthlyResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Message[] | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type ResponseRateResolver = ( - parent: User, + export type AverageWeeklyResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type ResponseTimeResolver = ( - parent: User, + export type BasePriceResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type SentMessagesResolver = ( - parent: User, + export type CleaningFeeResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Message[] | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type UpdatedAtResolver = ( - parent: User, + export type CurrencyResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => CURRENCY| null | Promise + - export type TokenResolver = ( - parent: User, + export type ExtraGuestsResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - export interface Type { - bookings: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; - - createdAt: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - email: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - firstName: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - hostingExperiences: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Experience[] | Promise; - - id: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - isSuperHost: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - lastName: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - location: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; - - notifications: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Notification[] | Promise; - - ownedPlaces: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Place[] | Promise; - - paymentAccount: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount[] | Promise; - - phone: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - profilePicture: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture | null | Promise; - - receivedMessages: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Message[] | Promise; - - responseRate: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - responseTime: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - sentMessages: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Message[] | Promise; - - updatedAt: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - token: ( - parent: User, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - } -} + info: GraphQLResolveInfo, + ) + => number| null | Promise + -export namespace BookingResolvers { - export const defaultResolvers = { - id: (parent: Booking) => parent.id, - createdAt: (parent: Booking) => parent.createdAt, - bookee: (parent: Booking) => parent.bookee, - place: (parent: Booking) => parent.place, - startDate: (parent: Booking) => parent.startDate, - endDate: (parent: Booking) => parent.endDate, - payment: (parent: Booking) => parent.payment - }; - - export type IdResolver = ( - parent: Booking, + export type IdResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CreatedAtResolver = ( - parent: Booking, + export type MonthlyDiscountResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type BookeeResolver = ( - parent: Booking, + export type PerNightResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type PlaceResolver = ( - parent: Booking, + export type SecurityDepositResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Place | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type StartDateResolver = ( - parent: Booking, + export type SmartPricingResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type EndDateResolver = ( - parent: Booking, + export type WeekendPricingResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type PaymentResolver = ( - parent: Booking, + export type WeeklyDiscountResolver = + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Payment | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + + export interface Type { - id: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - createdAt: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - bookee: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; - - place: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Place | Promise; - - startDate: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - endDate: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - payment: ( - parent: Booking, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Payment | Promise; - } -} - -export namespace PlaceResolvers { - export const defaultResolvers = { - id: (parent: Place) => parent.id, - name: (parent: Place) => (parent.name === undefined ? null : parent.name), - size: (parent: Place) => (parent.size === undefined ? null : parent.size), - shortDescription: (parent: Place) => parent.shortDescription, - description: (parent: Place) => parent.description, - slug: (parent: Place) => parent.slug, - maxGuests: (parent: Place) => parent.maxGuests, - numBedrooms: (parent: Place) => parent.numBedrooms, - numBeds: (parent: Place) => parent.numBeds, - numBaths: (parent: Place) => parent.numBaths, - reviews: (parent: Place) => parent.reviews, - amenities: (parent: Place) => parent.amenities, - host: (parent: Place) => parent.host, - pricing: (parent: Place) => parent.pricing, - location: (parent: Place) => parent.location, - views: (parent: Place) => parent.views, - guestRequirements: (parent: Place) => - parent.guestRequirements === undefined ? null : parent.guestRequirements, - policies: (parent: Place) => - parent.policies === undefined ? null : parent.policies, - houseRules: (parent: Place) => - parent.houseRules === undefined ? null : parent.houseRules, - bookings: (parent: Place) => parent.bookings, - pictures: (parent: Place) => parent.pictures, - popularity: (parent: Place) => parent.popularity - }; - - export type IdResolver = ( - parent: Place, + + averageMonthly: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type NameResolver = ( - parent: Place, + averageWeekly: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type SizeResolver = ( - parent: Place, + basePrice: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PLACE_SIZES | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type ShortDescriptionResolver = ( - parent: Place, + cleaningFee: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type DescriptionResolver = ( - parent: Place, + currency: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => CURRENCY| null | Promise + - export type SlugResolver = ( - parent: Place, + extraGuests: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type MaxGuestsResolver = ( - parent: Place, + id: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type NumBedroomsResolver = ( - parent: Place, + monthlyDiscount: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type NumBedsResolver = ( - parent: Place, + perNight: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type NumBathsResolver = ( - parent: Place, + securityDeposit: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type ReviewsResolver = ( - parent: Place, + smartPricing: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Review[] | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type AmenitiesResolver = ( - parent: Place, + weekendPricing: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Amenities | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + - export type HostResolver = ( - parent: Place, + weeklyDiscount: + ( + parent: Pricing, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => number| null | Promise + + } + - export type PricingResolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Pricing | Promise; + + } + + export namespace PlaceViewsResolvers { - export type LocationResolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; + export const defaultResolvers = { + id: (parent: PlaceViews) => parent.id, +lastWeek: (parent: PlaceViews) => parent.lastWeek, + } - export type ViewsResolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PlaceViews | Promise; + - export type GuestRequirementsResolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => GuestRequirements | null | Promise; + - export type PoliciesResolver = ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Policies | null | Promise; - export type HouseRulesResolver = ( - parent: Place, + + export type IdResolver = + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => HouseRules | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type BookingsResolver = ( - parent: Place, + export type LastWeekResolver = + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type PicturesResolver = ( - parent: Place, + + export interface Type { + + id: + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type PopularityResolver = ( - parent: Place, + lastWeek: + ( + parent: PlaceViews, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + + } + - export interface Type { - id: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - name: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - size: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PLACE_SIZES | null | Promise; - - shortDescription: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - description: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - slug: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - maxGuests: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - numBedrooms: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - numBeds: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - numBaths: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - reviews: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Review[] | Promise; - - amenities: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Amenities | Promise; - - host: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; - - pricing: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Pricing | Promise; - - location: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Location | Promise; - - views: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PlaceViews | Promise; - - guestRequirements: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => GuestRequirements | null | Promise; - - policies: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Policies | null | Promise; - - houseRules: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => HouseRules | null | Promise; - - bookings: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Booking[] | Promise; - - pictures: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Picture[] | Promise; - - popularity: ( - parent: Place, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + } -} + + export namespace GuestRequirementsResolvers { -export namespace AmenitiesResolvers { - export const defaultResolvers = { - airConditioning: (parent: Amenities) => parent.airConditioning, - babyBath: (parent: Amenities) => parent.babyBath, - babyMonitor: (parent: Amenities) => parent.babyMonitor, - babysitterRecommendations: (parent: Amenities) => - parent.babysitterRecommendations, - bathtub: (parent: Amenities) => parent.bathtub, - breakfast: (parent: Amenities) => parent.breakfast, - buzzerWirelessIntercom: (parent: Amenities) => - parent.buzzerWirelessIntercom, - cableTv: (parent: Amenities) => parent.cableTv, - changingTable: (parent: Amenities) => parent.changingTable, - childrensBooksAndToys: (parent: Amenities) => parent.childrensBooksAndToys, - childrensDinnerware: (parent: Amenities) => parent.childrensDinnerware, - crib: (parent: Amenities) => parent.crib, - doorman: (parent: Amenities) => parent.doorman, - dryer: (parent: Amenities) => parent.dryer, - elevator: (parent: Amenities) => parent.elevator, - essentials: (parent: Amenities) => parent.essentials, - familyKidFriendly: (parent: Amenities) => parent.familyKidFriendly, - freeParkingOnPremises: (parent: Amenities) => parent.freeParkingOnPremises, - freeParkingOnStreet: (parent: Amenities) => parent.freeParkingOnStreet, - gym: (parent: Amenities) => parent.gym, - hairDryer: (parent: Amenities) => parent.hairDryer, - hangers: (parent: Amenities) => parent.hangers, - heating: (parent: Amenities) => parent.heating, - hotTub: (parent: Amenities) => parent.hotTub, - id: (parent: Amenities) => parent.id, - indoorFireplace: (parent: Amenities) => parent.indoorFireplace, - internet: (parent: Amenities) => parent.internet, - iron: (parent: Amenities) => parent.iron, - kitchen: (parent: Amenities) => parent.kitchen, - laptopFriendlyWorkspace: (parent: Amenities) => - parent.laptopFriendlyWorkspace, - paidParkingOffPremises: (parent: Amenities) => - parent.paidParkingOffPremises, - petsAllowed: (parent: Amenities) => parent.petsAllowed, - pool: (parent: Amenities) => parent.pool, - privateEntrance: (parent: Amenities) => parent.privateEntrance, - shampoo: (parent: Amenities) => parent.shampoo, - smokingAllowed: (parent: Amenities) => parent.smokingAllowed, - suitableForEvents: (parent: Amenities) => parent.suitableForEvents, - tv: (parent: Amenities) => parent.tv, - washer: (parent: Amenities) => parent.washer, - wheelchairAccessible: (parent: Amenities) => parent.wheelchairAccessible, - wirelessInternet: (parent: Amenities) => parent.wirelessInternet - }; - - export type AirConditioningResolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + export const defaultResolvers = { + govIssuedId: (parent: GuestRequirements) => parent.govIssuedId, +guestTripInformation: (parent: GuestRequirements) => parent.guestTripInformation, +id: (parent: GuestRequirements) => parent.id, +recommendationsFromOtherHosts: (parent: GuestRequirements) => parent.recommendationsFromOtherHosts, + } - export type BabyBathResolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + - export type BabyMonitorResolver = ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + - export type BabysitterRecommendationsResolver = ( - parent: Amenities, + + + + + export type GovIssuedIdResolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type BathtubResolver = ( - parent: Amenities, + export type GuestTripInformationResolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type BreakfastResolver = ( - parent: Amenities, + export type IdResolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type BuzzerWirelessIntercomResolver = ( - parent: Amenities, + export type RecommendationsFromOtherHostsResolver = + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type CableTvResolver = ( - parent: Amenities, + + export interface Type { + + govIssuedId: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ChangingTableResolver = ( - parent: Amenities, + guestTripInformation: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + - export type ChildrensBooksAndToysResolver = ( - parent: Amenities, + id: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type ChildrensDinnerwareResolver = ( - parent: Amenities, + recommendationsFromOtherHosts: + ( + parent: GuestRequirements, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + } + - export type CribResolver = ( - parent: Amenities, + + } + + export namespace PoliciesResolvers { + + export const defaultResolvers = { + checkInEndTime: (parent: Policies) => parent.checkInEndTime, +checkInStartTime: (parent: Policies) => parent.checkInStartTime, +checkoutTime: (parent: Policies) => parent.checkoutTime, +createdAt: (parent: Policies) => parent.createdAt, +id: (parent: Policies) => parent.id, +updatedAt: (parent: Policies) => parent.updatedAt, + } + + + + + + + + + + + + export type CheckInEndTimeResolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type DoormanResolver = ( - parent: Amenities, + export type CheckInStartTimeResolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type DryerResolver = ( - parent: Amenities, + export type CheckoutTimeResolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type ElevatorResolver = ( - parent: Amenities, + export type CreatedAtResolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type EssentialsResolver = ( - parent: Amenities, + export type IdResolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type FamilyKidFriendlyResolver = ( - parent: Amenities, + export type UpdatedAtResolver = + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type FreeParkingOnPremisesResolver = ( - parent: Amenities, + + export interface Type { + + checkInEndTime: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type FreeParkingOnStreetResolver = ( - parent: Amenities, + checkInStartTime: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type GymResolver = ( - parent: Amenities, + checkoutTime: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type HairDryerResolver = ( - parent: Amenities, + createdAt: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type HangersResolver = ( - parent: Amenities, + id: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type HeatingResolver = ( - parent: Amenities, + updatedAt: + ( + parent: Policies, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + } + - export type HotTubResolver = ( - parent: Amenities, + + } + + export namespace HouseRulesResolvers { + + export const defaultResolvers = { + additionalRules: (parent: HouseRules) => parent.additionalRules === undefined ? null : parent.additionalRules, +createdAt: (parent: HouseRules) => parent.createdAt, +id: (parent: HouseRules) => parent.id, +partiesAndEventsAllowed: (parent: HouseRules) => parent.partiesAndEventsAllowed === undefined ? null : parent.partiesAndEventsAllowed, +petsAllowed: (parent: HouseRules) => parent.petsAllowed === undefined ? null : parent.petsAllowed, +smokingAllowed: (parent: HouseRules) => parent.smokingAllowed === undefined ? null : parent.smokingAllowed, +suitableForChildren: (parent: HouseRules) => parent.suitableForChildren === undefined ? null : parent.suitableForChildren, +suitableForInfants: (parent: HouseRules) => parent.suitableForInfants === undefined ? null : parent.suitableForInfants, +updatedAt: (parent: HouseRules) => parent.updatedAt, + } + + + + + + + + + + + + + + + export type AdditionalRulesResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - export type IdResolver = ( - parent: Amenities, + export type CreatedAtResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type IndoorFireplaceResolver = ( - parent: Amenities, + export type IdResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type InternetResolver = ( - parent: Amenities, + export type PartiesAndEventsAllowedResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type IronResolver = ( - parent: Amenities, + export type PetsAllowedResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type KitchenResolver = ( - parent: Amenities, + export type SmokingAllowedResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type LaptopFriendlyWorkspaceResolver = ( - parent: Amenities, + export type SuitableForChildrenResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type PaidParkingOffPremisesResolver = ( - parent: Amenities, + export type SuitableForInfantsResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type PetsAllowedResolver = ( - parent: Amenities, + export type UpdatedAtResolver = + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type PoolResolver = ( - parent: Amenities, + + export interface Type { + + additionalRules: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string| null | Promise + - export type PrivateEntranceResolver = ( - parent: Amenities, + createdAt: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type ShampooResolver = ( - parent: Amenities, + id: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type SmokingAllowedResolver = ( - parent: Amenities, + partiesAndEventsAllowed: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type SuitableForEventsResolver = ( - parent: Amenities, + petsAllowed: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type TvResolver = ( - parent: Amenities, + smokingAllowed: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type WasherResolver = ( - parent: Amenities, + suitableForChildren: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type WheelchairAccessibleResolver = ( - parent: Amenities, + suitableForInfants: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean| null | Promise + - export type WirelessInternetResolver = ( - parent: Amenities, + updatedAt: + ( + parent: HouseRules, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + } + - export interface Type { - airConditioning: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - babyBath: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - babyMonitor: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - babysitterRecommendations: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - bathtub: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - breakfast: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - buzzerWirelessIntercom: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - cableTv: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - changingTable: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - childrensBooksAndToys: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - childrensDinnerware: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - crib: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - doorman: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - dryer: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - elevator: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - essentials: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - familyKidFriendly: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - freeParkingOnPremises: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - freeParkingOnStreet: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - gym: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - hairDryer: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - hangers: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - heating: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - hotTub: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - id: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - indoorFireplace: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - internet: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - iron: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - kitchen: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - laptopFriendlyWorkspace: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - paidParkingOffPremises: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - petsAllowed: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - pool: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - privateEntrance: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - shampoo: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - smokingAllowed: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - suitableForEvents: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - tv: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - washer: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - wheelchairAccessible: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - wirelessInternet: ( - parent: Amenities, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + } -} + + export namespace PaymentResolvers { -export namespace PricingResolvers { - export const defaultResolvers = { - averageMonthly: (parent: Pricing) => parent.averageMonthly, - averageWeekly: (parent: Pricing) => parent.averageWeekly, - basePrice: (parent: Pricing) => parent.basePrice, - cleaningFee: (parent: Pricing) => - parent.cleaningFee === undefined ? null : parent.cleaningFee, - currency: (parent: Pricing) => - parent.currency === undefined ? null : parent.currency, - extraGuests: (parent: Pricing) => - parent.extraGuests === undefined ? null : parent.extraGuests, - id: (parent: Pricing) => parent.id, - monthlyDiscount: (parent: Pricing) => - parent.monthlyDiscount === undefined ? null : parent.monthlyDiscount, - perNight: (parent: Pricing) => parent.perNight, - securityDeposit: (parent: Pricing) => - parent.securityDeposit === undefined ? null : parent.securityDeposit, - smartPricing: (parent: Pricing) => parent.smartPricing, - weekendPricing: (parent: Pricing) => - parent.weekendPricing === undefined ? null : parent.weekendPricing, - weeklyDiscount: (parent: Pricing) => - parent.weeklyDiscount === undefined ? null : parent.weeklyDiscount - }; - - export type AverageMonthlyResolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + export const defaultResolvers = { + booking: (parent: Payment) => parent.booking, +createdAt: (parent: Payment) => parent.createdAt, +id: (parent: Payment) => parent.id, +paymentMethod: (parent: Payment) => parent.paymentMethod, +serviceFee: (parent: Payment) => parent.serviceFee, + } - export type AverageWeeklyResolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + - export type BasePriceResolver = ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + - export type CleaningFeeResolver = ( - parent: Pricing, + + + + + + export type BookingResolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => Booking | Promise + - export type CurrencyResolver = ( - parent: Pricing, + export type CreatedAtResolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => CURRENCY | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type ExtraGuestsResolver = ( - parent: Pricing, + export type IdResolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type IdResolver = ( - parent: Pricing, + export type PaymentMethodResolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount | Promise + - export type MonthlyDiscountResolver = ( - parent: Pricing, + export type ServiceFeeResolver = + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type PerNightResolver = ( - parent: Pricing, + + export interface Type { + + booking: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => Booking | Promise + - export type SecurityDepositResolver = ( - parent: Pricing, + createdAt: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type SmartPricingResolver = ( - parent: Pricing, + id: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type WeekendPricingResolver = ( - parent: Pricing, + paymentMethod: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount | Promise + - export type WeeklyDiscountResolver = ( - parent: Pricing, + serviceFee: + ( + parent: Payment, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + + } + - export interface Type { - averageMonthly: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - averageWeekly: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - basePrice: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - cleaningFee: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - currency: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => CURRENCY | null | Promise; - - extraGuests: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - id: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - monthlyDiscount: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - perNight: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - securityDeposit: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - smartPricing: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - weekendPricing: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; - - weeklyDiscount: ( - parent: Pricing, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | null | Promise; + } -} + + export namespace PaymentAccountResolvers { -export namespace PlaceViewsResolvers { - export const defaultResolvers = { - id: (parent: PlaceViews) => parent.id, - lastWeek: (parent: PlaceViews) => parent.lastWeek - }; + export const defaultResolvers = { + id: (parent: PaymentAccount) => parent.id, +createdAt: (parent: PaymentAccount) => parent.createdAt, +type: (parent: PaymentAccount) => parent.type === undefined ? null : parent.type, +user: (parent: PaymentAccount) => parent.user, +payments: (parent: PaymentAccount) => parent.payments, +paypal: (parent: PaymentAccount) => parent.paypal === undefined ? null : parent.paypal, +creditcard: (parent: PaymentAccount) => parent.creditcard === undefined ? null : parent.creditcard, + } - export type IdResolver = ( - parent: PlaceViews, + + + + + + + + + + + + export type IdResolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type LastWeekResolver = ( - parent: PlaceViews, + export type CreatedAtResolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export interface Type { - id: ( - parent: PlaceViews, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - lastWeek: ( - parent: PlaceViews, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} + export type TypeResolver = + ( + parent: PaymentAccount, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => PAYMENT_PROVIDER| null | Promise + -export namespace GuestRequirementsResolvers { - export const defaultResolvers = { - govIssuedId: (parent: GuestRequirements) => parent.govIssuedId, - guestTripInformation: (parent: GuestRequirements) => - parent.guestTripInformation, - id: (parent: GuestRequirements) => parent.id, - recommendationsFromOtherHosts: (parent: GuestRequirements) => - parent.recommendationsFromOtherHosts - }; - - export type GovIssuedIdResolver = ( - parent: GuestRequirements, + export type UserResolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => User | Promise + - export type GuestTripInformationResolver = ( - parent: GuestRequirements, + export type PaymentsResolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => Payment[] | Promise + - export type IdResolver = ( - parent: GuestRequirements, + export type PaypalResolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => PaypalInformation| null | Promise + - export type RecommendationsFromOtherHostsResolver = ( - parent: GuestRequirements, + export type CreditcardResolver = + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => CreditCardInformation| null | Promise + + export interface Type { - govIssuedId: ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - guestTripInformation: ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - - id: ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - recommendationsFromOtherHosts: ( - parent: GuestRequirements, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; - } -} + + id: + ( + parent: PaymentAccount, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + -export namespace PoliciesResolvers { - export const defaultResolvers = { - checkInEndTime: (parent: Policies) => parent.checkInEndTime, - checkInStartTime: (parent: Policies) => parent.checkInStartTime, - checkoutTime: (parent: Policies) => parent.checkoutTime, - createdAt: (parent: Policies) => parent.createdAt, - id: (parent: Policies) => parent.id, - updatedAt: (parent: Policies) => parent.updatedAt - }; - - export type CheckInEndTimeResolver = ( - parent: Policies, + createdAt: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CheckInStartTimeResolver = ( - parent: Policies, + type: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => PAYMENT_PROVIDER| null | Promise + - export type CheckoutTimeResolver = ( - parent: Policies, + user: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => User | Promise + - export type CreatedAtResolver = ( - parent: Policies, + payments: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => Payment[] | Promise + - export type IdResolver = ( - parent: Policies, + paypal: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => PaypalInformation| null | Promise + - export type UpdatedAtResolver = ( - parent: Policies, + creditcard: + ( + parent: PaymentAccount, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => CreditCardInformation| null | Promise + + } + - export interface Type { - checkInEndTime: ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - checkInStartTime: ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - checkoutTime: ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - createdAt: ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - updatedAt: ( - parent: Policies, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + } -} + + export namespace PaypalInformationResolvers { -export namespace HouseRulesResolvers { - export const defaultResolvers = { - additionalRules: (parent: HouseRules) => - parent.additionalRules === undefined ? null : parent.additionalRules, - createdAt: (parent: HouseRules) => parent.createdAt, - id: (parent: HouseRules) => parent.id, - partiesAndEventsAllowed: (parent: HouseRules) => - parent.partiesAndEventsAllowed === undefined - ? null - : parent.partiesAndEventsAllowed, - petsAllowed: (parent: HouseRules) => - parent.petsAllowed === undefined ? null : parent.petsAllowed, - smokingAllowed: (parent: HouseRules) => - parent.smokingAllowed === undefined ? null : parent.smokingAllowed, - suitableForChildren: (parent: HouseRules) => - parent.suitableForChildren === undefined - ? null - : parent.suitableForChildren, - suitableForInfants: (parent: HouseRules) => - parent.suitableForInfants === undefined - ? null - : parent.suitableForInfants, - updatedAt: (parent: HouseRules) => parent.updatedAt - }; - - export type AdditionalRulesResolver = ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; + export const defaultResolvers = { + createdAt: (parent: PaypalInformation) => parent.createdAt, +email: (parent: PaypalInformation) => parent.email, +id: (parent: PaypalInformation) => parent.id, +paymentAccount: (parent: PaypalInformation) => parent.paymentAccount, + } - export type CreatedAtResolver = ( - parent: HouseRules, + + + + + + + + + export type CreatedAtResolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type IdResolver = ( - parent: HouseRules, + export type EmailResolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type PartiesAndEventsAllowedResolver = ( - parent: HouseRules, + export type IdResolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type PetsAllowedResolver = ( - parent: HouseRules, + export type PaymentAccountResolver = + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount | Promise + - export type SmokingAllowedResolver = ( - parent: HouseRules, + + export interface Type { + + createdAt: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type SuitableForChildrenResolver = ( - parent: HouseRules, + email: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type SuitableForInfantsResolver = ( - parent: HouseRules, + id: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type UpdatedAtResolver = ( - parent: HouseRules, + paymentAccount: + ( + parent: PaypalInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount | Promise + + } + - export interface Type { - additionalRules: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | null | Promise; - - createdAt: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - partiesAndEventsAllowed: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - petsAllowed: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - smokingAllowed: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - suitableForChildren: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - suitableForInfants: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | null | Promise; - - updatedAt: ( - parent: HouseRules, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + } -} + + export namespace CreditCardInformationResolvers { -export namespace PaymentResolvers { - export const defaultResolvers = { - booking: (parent: Payment) => parent.booking, - createdAt: (parent: Payment) => parent.createdAt, - id: (parent: Payment) => parent.id, - paymentMethod: (parent: Payment) => parent.paymentMethod, - serviceFee: (parent: Payment) => parent.serviceFee - }; + export const defaultResolvers = { + cardNumber: (parent: CreditCardInformation) => parent.cardNumber, +country: (parent: CreditCardInformation) => parent.country, +createdAt: (parent: CreditCardInformation) => parent.createdAt, +expiresOnMonth: (parent: CreditCardInformation) => parent.expiresOnMonth, +expiresOnYear: (parent: CreditCardInformation) => parent.expiresOnYear, +firstName: (parent: CreditCardInformation) => parent.firstName, +id: (parent: CreditCardInformation) => parent.id, +lastName: (parent: CreditCardInformation) => parent.lastName, +paymentAccount: (parent: CreditCardInformation) => parent.paymentAccount === undefined ? null : parent.paymentAccount, +postalCode: (parent: CreditCardInformation) => parent.postalCode, +securityCode: (parent: CreditCardInformation) => parent.securityCode, + } - export type BookingResolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Booking | Promise; + - export type CreatedAtResolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + - export type IdResolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - export type PaymentMethodResolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | Promise; - export type ServiceFeeResolver = ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - export interface Type { - booking: ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Booking | Promise; - - createdAt: ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - paymentMethod: ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | Promise; - - serviceFee: ( - parent: Payment, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - } -} -export namespace PaymentAccountResolvers { - export const defaultResolvers = { - id: (parent: PaymentAccount) => parent.id, - createdAt: (parent: PaymentAccount) => parent.createdAt, - type: (parent: PaymentAccount) => - parent.type === undefined ? null : parent.type, - user: (parent: PaymentAccount) => parent.user, - payments: (parent: PaymentAccount) => parent.payments, - paypal: (parent: PaymentAccount) => - parent.paypal === undefined ? null : parent.paypal, - creditcard: (parent: PaymentAccount) => - parent.creditcard === undefined ? null : parent.creditcard - }; - - export type IdResolver = ( - parent: PaymentAccount, + + + + + + + + export type CardNumberResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CreatedAtResolver = ( - parent: PaymentAccount, + export type CountryResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type TypeResolver = ( - parent: PaymentAccount, + export type CreatedAtResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PAYMENT_PROVIDER | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type UserResolver = ( - parent: PaymentAccount, + export type ExpiresOnMonthResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type PaymentsResolver = ( - parent: PaymentAccount, + export type ExpiresOnYearResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => Payment[] | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type PaypalResolver = ( - parent: PaymentAccount, + export type FirstNameResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaypalInformation | null | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CreditcardResolver = ( - parent: PaymentAccount, + export type IdResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => CreditCardInformation | null | Promise; - - export interface Type { - id: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - createdAt: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - type: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PAYMENT_PROVIDER | null | Promise; - - user: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; - - payments: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => Payment[] | Promise; - - paypal: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaypalInformation | null | Promise; - - creditcard: ( - parent: PaymentAccount, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => CreditCardInformation | null | Promise; - } -} - -export namespace PaypalInformationResolvers { - export const defaultResolvers = { - createdAt: (parent: PaypalInformation) => parent.createdAt, - email: (parent: PaypalInformation) => parent.email, - id: (parent: PaypalInformation) => parent.id, - paymentAccount: (parent: PaypalInformation) => parent.paymentAccount - }; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CreatedAtResolver = ( - parent: PaypalInformation, + export type LastNameResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type EmailResolver = ( - parent: PaypalInformation, + export type PaymentAccountResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount| null | Promise + - export type IdResolver = ( - parent: PaypalInformation, + export type PostalCodeResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type PaymentAccountResolver = ( - parent: PaypalInformation, + export type SecurityCodeResolver = + ( + parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + export interface Type { - createdAt: ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - email: ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - paymentAccount: ( - parent: PaypalInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | Promise; - } -} - -export namespace CreditCardInformationResolvers { - export const defaultResolvers = { - cardNumber: (parent: CreditCardInformation) => parent.cardNumber, - country: (parent: CreditCardInformation) => parent.country, - createdAt: (parent: CreditCardInformation) => parent.createdAt, - expiresOnMonth: (parent: CreditCardInformation) => parent.expiresOnMonth, - expiresOnYear: (parent: CreditCardInformation) => parent.expiresOnYear, - firstName: (parent: CreditCardInformation) => parent.firstName, - id: (parent: CreditCardInformation) => parent.id, - lastName: (parent: CreditCardInformation) => parent.lastName, - paymentAccount: (parent: CreditCardInformation) => - parent.paymentAccount === undefined ? null : parent.paymentAccount, - postalCode: (parent: CreditCardInformation) => parent.postalCode, - securityCode: (parent: CreditCardInformation) => parent.securityCode - }; - - export type CardNumberResolver = ( + + cardNumber: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CountryResolver = ( + country: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type CreatedAtResolver = ( + createdAt: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type ExpiresOnMonthResolver = ( + expiresOnMonth: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type ExpiresOnYearResolver = ( + expiresOnYear: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; + info: GraphQLResolveInfo, + ) + => number | Promise + - export type FirstNameResolver = ( + firstName: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type IdResolver = ( + id: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type LastNameResolver = ( + lastName: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type PaymentAccountResolver = ( + paymentAccount: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | null | Promise; + info: GraphQLResolveInfo, + ) + => PaymentAccount| null | Promise + - export type PostalCodeResolver = ( + postalCode: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type SecurityCodeResolver = ( + securityCode: + ( parent: CreditCardInformation, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + } + - export interface Type { - cardNumber: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - country: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - createdAt: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - expiresOnMonth: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - expiresOnYear: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => number | Promise; - - firstName: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - lastName: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - paymentAccount: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => PaymentAccount | null | Promise; - - postalCode: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - securityCode: ( - parent: CreditCardInformation, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + } -} + + export namespace NotificationResolvers { -export namespace NotificationResolvers { - export const defaultResolvers = { + export const defaultResolvers = { createdAt: (parent: Notification) => parent.createdAt, - id: (parent: Notification) => parent.id, - link: (parent: Notification) => parent.link, - readDate: (parent: Notification) => parent.readDate, - type: (parent: Notification) => - parent.type === undefined ? null : parent.type, - user: (parent: Notification) => parent.user - }; - - export type CreatedAtResolver = ( +id: (parent: Notification) => parent.id, +link: (parent: Notification) => parent.link, +readDate: (parent: Notification) => parent.readDate, +type: (parent: Notification) => parent.type === undefined ? null : parent.type, +user: (parent: Notification) => parent.user, + } + + + + + + + + + + + + export type CreatedAtResolver = + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type IdResolver = ( + export type IdResolver = + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type LinkResolver = ( + export type LinkResolver = + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type ReadDateResolver = ( + export type ReadDateResolver = + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type TypeResolver = ( + export type TypeResolver = + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => NOTIFICATION_TYPE | null | Promise; + info: GraphQLResolveInfo, + ) + => NOTIFICATION_TYPE| null | Promise + - export type UserResolver = ( + export type UserResolver = + ( parent: Notification, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => User | Promise + + export interface Type { - createdAt: ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - link: ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - readDate: ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - type: ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => NOTIFICATION_TYPE | null | Promise; - - user: ( - parent: Notification, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + + createdAt: + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + id: + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + link: + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + readDate: + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + type: + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => NOTIFICATION_TYPE| null | Promise + + + user: + ( + parent: Notification, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + } -} + + + + } + + export namespace MessageResolvers { -export namespace MessageResolvers { - export const defaultResolvers = { + export const defaultResolvers = { createdAt: (parent: Message) => parent.createdAt, - deliveredAt: (parent: Message) => parent.deliveredAt, - id: (parent: Message) => parent.id, - readAt: (parent: Message) => parent.readAt - }; +deliveredAt: (parent: Message) => parent.deliveredAt, +id: (parent: Message) => parent.id, +readAt: (parent: Message) => parent.readAt, + } + + + + - export type CreatedAtResolver = ( + + + + + export type CreatedAtResolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type DeliveredAtResolver = ( + export type DeliveredAtResolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type IdResolver = ( + export type IdResolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type ReadAtResolver = ( + export type ReadAtResolver = + ( parent: Message, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + + export interface Type { - createdAt: ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - deliveredAt: ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - id: ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - readAt: ( - parent: Message, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + + createdAt: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + deliveredAt: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + id: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + readAt: + ( + parent: Message, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + } -} + + + + } + + export namespace MutationResolvers { + + export const defaultResolvers = {} -export namespace MutationResolvers { - export const defaultResolvers = {}; + + export interface ArgsSignup { - email: string; - password: string; - firstName: string; - lastName: string; - phone: string; + email: string +password: string +firstName: string +lastName: string +phone: string } + export interface ArgsLogin { - email: string; - password: string; + email: string +password: string } + export interface ArgsAddPaymentMethod { - cardNumber: string; - expiresOnMonth: number; - expiresOnYear: number; - securityCode: string; - firstName: string; - lastName: string; - postalCode: string; - country: string; + cardNumber: string +expiresOnMonth: number +expiresOnYear: number +securityCode: string +firstName: string +lastName: string +postalCode: string +country: string } + export interface ArgsBook { - placeId: string; - checkIn: string; - checkOut: string; - numGuests: number; + placeId: string +checkIn: string +checkOut: string +numGuests: number } + - export type SignupResolver = ( + + export type SignupResolver = + ( parent: undefined, args: ArgsSignup, ctx: Context, - info: GraphQLResolveInfo - ) => AuthPayload | Promise; + info: GraphQLResolveInfo, + ) + => AuthPayload | Promise + - export type LoginResolver = ( + export type LoginResolver = + ( parent: undefined, args: ArgsLogin, ctx: Context, - info: GraphQLResolveInfo - ) => AuthPayload | Promise; + info: GraphQLResolveInfo, + ) + => AuthPayload | Promise + - export type AddPaymentMethodResolver = ( + export type AddPaymentMethodResolver = + ( parent: undefined, args: ArgsAddPaymentMethod, ctx: Context, - info: GraphQLResolveInfo - ) => MutationResult | Promise; + info: GraphQLResolveInfo, + ) + => MutationResult | Promise + - export type BookResolver = ( + export type BookResolver = + ( parent: undefined, args: ArgsBook, ctx: Context, - info: GraphQLResolveInfo - ) => MutationResult | Promise; + info: GraphQLResolveInfo, + ) + => MutationResult | Promise + + export interface Type { - signup: ( - parent: undefined, - args: ArgsSignup, - ctx: Context, - info: GraphQLResolveInfo - ) => AuthPayload | Promise; - - login: ( - parent: undefined, - args: ArgsLogin, - ctx: Context, - info: GraphQLResolveInfo - ) => AuthPayload | Promise; - - addPaymentMethod: ( - parent: undefined, - args: ArgsAddPaymentMethod, - ctx: Context, - info: GraphQLResolveInfo - ) => MutationResult | Promise; - - book: ( - parent: undefined, - args: ArgsBook, - ctx: Context, - info: GraphQLResolveInfo - ) => MutationResult | Promise; + + signup: + ( + parent: undefined, + args: ArgsSignup, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AuthPayload | Promise + + + login: + ( + parent: undefined, + args: ArgsLogin, + ctx: Context, + info: GraphQLResolveInfo, + ) + => AuthPayload | Promise + + + addPaymentMethod: + ( + parent: undefined, + args: ArgsAddPaymentMethod, + ctx: Context, + info: GraphQLResolveInfo, + ) + => MutationResult | Promise + + + book: + ( + parent: undefined, + args: ArgsBook, + ctx: Context, + info: GraphQLResolveInfo, + ) + => MutationResult | Promise + } -} + + + + } + + export namespace AuthPayloadResolvers { -export namespace AuthPayloadResolvers { - export const defaultResolvers = { + export const defaultResolvers = { token: (parent: AuthPayload) => parent.token, - user: (parent: AuthPayload) => parent.user - }; +user: (parent: AuthPayload) => parent.user, + } + + + + + - export type TokenResolver = ( + + export type TokenResolver = + ( parent: AuthPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; + info: GraphQLResolveInfo, + ) + => string | Promise + - export type UserResolver = ( + export type UserResolver = + ( parent: AuthPayload, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + info: GraphQLResolveInfo, + ) + => User | Promise + + export interface Type { - token: ( - parent: AuthPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => string | Promise; - - user: ( - parent: AuthPayload, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => User | Promise; + + token: + ( + parent: AuthPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => string | Promise + + + user: + ( + parent: AuthPayload, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => User | Promise + + } + + + + } + + export namespace MutationResultResolvers { + + export const defaultResolvers = { + success: (parent: MutationResult) => parent.success, } -} -export namespace MutationResultResolvers { - export const defaultResolvers = { - success: (parent: MutationResult) => parent.success - }; + - export type SuccessResolver = ( + + + + export type SuccessResolver = + ( parent: MutationResult, args: {}, ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + info: GraphQLResolveInfo, + ) + => boolean | Promise + + export interface Type { - success: ( - parent: MutationResult, - args: {}, - ctx: Context, - info: GraphQLResolveInfo - ) => boolean | Promise; + + success: + ( + parent: MutationResult, + args: {}, + ctx: Context, + info: GraphQLResolveInfo, + ) + => boolean | Promise + } -} + + + + } + + export interface Resolvers { - Query: QueryResolvers.Type; - Experience: ExperienceResolvers.Type; - ExperienceCategory: ExperienceCategoryResolvers.Type; - Location: LocationResolvers.Type; - Review: ReviewResolvers.Type; - Picture: PictureResolvers.Type; - Home: HomeResolvers.Type; - Reservation: ReservationResolvers.Type; - Neighbourhood: NeighbourhoodResolvers.Type; - City: CityResolvers.Type; - ExperiencesByCity: ExperiencesByCityResolvers.Type; - Viewer: ViewerResolvers.Type; - User: UserResolvers.Type; - Booking: BookingResolvers.Type; - Place: PlaceResolvers.Type; - Amenities: AmenitiesResolvers.Type; - Pricing: PricingResolvers.Type; - PlaceViews: PlaceViewsResolvers.Type; - GuestRequirements: GuestRequirementsResolvers.Type; - Policies: PoliciesResolvers.Type; - HouseRules: HouseRulesResolvers.Type; - Payment: PaymentResolvers.Type; - PaymentAccount: PaymentAccountResolvers.Type; - PaypalInformation: PaypalInformationResolvers.Type; - CreditCardInformation: CreditCardInformationResolvers.Type; - Notification: NotificationResolvers.Type; - Message: MessageResolvers.Type; - Mutation: MutationResolvers.Type; - AuthPayload: AuthPayloadResolvers.Type; - MutationResult: MutationResultResolvers.Type; + Query: QueryResolvers.Type +Experience: ExperienceResolvers.Type +ExperienceCategory: ExperienceCategoryResolvers.Type +Location: LocationResolvers.Type +Review: ReviewResolvers.Type +Picture: PictureResolvers.Type +Home: HomeResolvers.Type +Reservation: ReservationResolvers.Type +Neighbourhood: NeighbourhoodResolvers.Type +City: CityResolvers.Type +ExperiencesByCity: ExperiencesByCityResolvers.Type +Viewer: ViewerResolvers.Type +User: UserResolvers.Type +Booking: BookingResolvers.Type +Place: PlaceResolvers.Type +Amenities: AmenitiesResolvers.Type +Pricing: PricingResolvers.Type +PlaceViews: PlaceViewsResolvers.Type +GuestRequirements: GuestRequirementsResolvers.Type +Policies: PoliciesResolvers.Type +HouseRules: HouseRulesResolvers.Type +Payment: PaymentResolvers.Type +PaymentAccount: PaymentAccountResolvers.Type +PaypalInformation: PaypalInformationResolvers.Type +CreditCardInformation: CreditCardInformationResolvers.Type +Notification: NotificationResolvers.Type +Message: MessageResolvers.Type +Mutation: MutationResolvers.Type +AuthPayload: AuthPayloadResolvers.Type +MutationResult: MutationResultResolvers.Type } -" + + + " `; exports[`large schema tests large schema 2`] = `