@@ -2227,6 +2227,85 @@ export const aQuery = (overrides?: Partial<Query>): Query => {
22272227"
22282228`;
22292229
2230+ exports[`should generate mock data with enum values as string union type if enumsAsTypes is true and cast the type if useTypeImports 1`] = `
2231+ "
2232+ export const anAvatar = (overrides?: Partial<Avatar>): Avatar => {
2233+     return {
2234+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '0550ff93-dd31-49b4-8c38-ff1cb68bdc38',
2235+         url: overrides && overrides.hasOwnProperty('url') ? overrides.url! : 'aliquid',
2236+     };
2237+ };
2238+ 
2239+ export const aUser = (overrides?: Partial<User>): User => {
2240+     return {
2241+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'a5756f00-41a6-422a-8a7d-d13ee6a63750',
2242+         creationDate: overrides && overrides.hasOwnProperty('creationDate') ? overrides.creationDate! : '1970-01-09T16:33:21.532Z',
2243+         login: overrides && overrides.hasOwnProperty('login') ? overrides.login! : 'libero',
2244+         avatar: overrides && overrides.hasOwnProperty('avatar') ? overrides.avatar! : anAvatar(),
2245+         status: overrides && overrides.hasOwnProperty('status') ? overrides.status! : ('ONLINE' as Status),
2246+         customStatus: overrides && overrides.hasOwnProperty('customStatus') ? overrides.customStatus! : ('hasXYZStatus' as AbcStatus),
2247+         scalarValue: overrides && overrides.hasOwnProperty('scalarValue') ? overrides.scalarValue! : 'neque',
2248+         camelCaseThing: overrides && overrides.hasOwnProperty('camelCaseThing') ? overrides.camelCaseThing! : aCamelCaseThing(),
2249+         unionThing: overrides && overrides.hasOwnProperty('unionThing') ? overrides.unionThing! : anAvatar(),
2250+         prefixedEnum: overrides && overrides.hasOwnProperty('prefixedEnum') ? overrides.prefixedEnum! : ('PREFIXED_VALUE' as PrefixedEnum),
2251+     };
2252+ };
2253+ 
2254+ export const aWithAvatar = (overrides?: Partial<WithAvatar>): WithAvatar => {
2255+     return {
2256+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '89f515e7-31e0-461d-a230-c4c7f4dafc5c',
2257+         avatar: overrides && overrides.hasOwnProperty('avatar') ? overrides.avatar! : anAvatar(),
2258+     };
2259+ };
2260+ 
2261+ export const aCamelCaseThing = (overrides?: Partial<CamelCaseThing>): CamelCaseThing => {
2262+     return {
2263+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '345b9cf9-00fa-4974-800f-aeee5ee7fd42',
2264+     };
2265+ };
2266+ 
2267+ export const aPrefixedResponse = (overrides?: Partial<PrefixedResponse>): PrefixedResponse => {
2268+     return {
2269+         ping: overrides && overrides.hasOwnProperty('ping') ? overrides.ping! : 'sunt',
2270+     };
2271+ };
2272+ 
2273+ export const anAbcType = (overrides?: Partial<AbcType>): AbcType => {
2274+     return {
2275+         abc: overrides && overrides.hasOwnProperty('abc') ? overrides.abc! : 'sit',
2276+     };
2277+ };
2278+ 
2279+ export const aListType = (overrides?: Partial<ListType>): ListType => {
2280+     return {
2281+         stringList: overrides && overrides.hasOwnProperty('stringList') ? overrides.stringList! : ['voluptatem'],
2282+         nullableStringList: overrides && overrides.hasOwnProperty('nullableStringList') ? overrides.nullableStringList! : ['eum'],
2283+     };
2284+ };
2285+ 
2286+ export const anUpdateUserInput = (overrides?: Partial<UpdateUserInput>): UpdateUserInput => {
2287+     return {
2288+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '1d6a9360-c92b-4660-8e5f-04155047bddc',
2289+         login: overrides && overrides.hasOwnProperty('login') ? overrides.login! : 'qui',
2290+         avatar: overrides && overrides.hasOwnProperty('avatar') ? overrides.avatar! : anAvatar(),
2291+     };
2292+ };
2293+ 
2294+ export const aMutation = (overrides?: Partial<Mutation>): Mutation => {
2295+     return {
2296+         updateUser: overrides && overrides.hasOwnProperty('updateUser') ? overrides.updateUser! : aUser(),
2297+     };
2298+ };
2299+ 
2300+ export const aQuery = (overrides?: Partial<Query>): Query => {
2301+     return {
2302+         user: overrides && overrides.hasOwnProperty('user') ? overrides.user! : aUser(),
2303+         prefixed_query: overrides && overrides.hasOwnProperty('prefixed_query') ? overrides.prefixed_query! : aPrefixedResponse(),
2304+     };
2305+ };
2306+ "
2307+ `;
2308+ 
22302309exports[`should generate mock data with typename if addTypename is true 1`] = `
22312310"
22322311export const anAvatar = (overrides?: Partial<Avatar>): { __typename: 'Avatar' } & Avatar => {
@@ -3113,6 +3192,86 @@ export const aQuery = (overrides?: Partial<Query>): Query => {
31133192"
31143193`;
31153194
3195+ exports[`should preserve underscores if transformUnderscore is false and enumsAsTypes is true as cast the enum type if useTypeImports is true 1`] = `
3196+ "import type { Avatar, User, WithAvatar, CamelCaseThing, Prefixed_Response, AbcType, ListType, UpdateUserInput, Mutation, Query, AbcStatus, Status, Prefixed_Enum } from './types/graphql';
3197+ 
3198+ export const anAvatar = (overrides?: Partial<Avatar>): Avatar => {
3199+     return {
3200+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '0550ff93-dd31-49b4-8c38-ff1cb68bdc38',
3201+         url: overrides && overrides.hasOwnProperty('url') ? overrides.url! : 'aliquid',
3202+     };
3203+ };
3204+ 
3205+ export const aUser = (overrides?: Partial<User>): User => {
3206+     return {
3207+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'a5756f00-41a6-422a-8a7d-d13ee6a63750',
3208+         creationDate: overrides && overrides.hasOwnProperty('creationDate') ? overrides.creationDate! : '1970-01-09T16:33:21.532Z',
3209+         login: overrides && overrides.hasOwnProperty('login') ? overrides.login! : 'libero',
3210+         avatar: overrides && overrides.hasOwnProperty('avatar') ? overrides.avatar! : anAvatar(),
3211+         status: overrides && overrides.hasOwnProperty('status') ? overrides.status! : ('ONLINE' as Status),
3212+         customStatus: overrides && overrides.hasOwnProperty('customStatus') ? overrides.customStatus! : ('hasXYZStatus' as AbcStatus),
3213+         scalarValue: overrides && overrides.hasOwnProperty('scalarValue') ? overrides.scalarValue! : 'neque',
3214+         camelCaseThing: overrides && overrides.hasOwnProperty('camelCaseThing') ? overrides.camelCaseThing! : aCamelCaseThing(),
3215+         unionThing: overrides && overrides.hasOwnProperty('unionThing') ? overrides.unionThing! : anAvatar(),
3216+         prefixedEnum: overrides && overrides.hasOwnProperty('prefixedEnum') ? overrides.prefixedEnum! : ('PREFIXED_VALUE' as Prefixed_Enum),
3217+     };
3218+ };
3219+ 
3220+ export const aWithAvatar = (overrides?: Partial<WithAvatar>): WithAvatar => {
3221+     return {
3222+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '89f515e7-31e0-461d-a230-c4c7f4dafc5c',
3223+         avatar: overrides && overrides.hasOwnProperty('avatar') ? overrides.avatar! : anAvatar(),
3224+     };
3225+ };
3226+ 
3227+ export const aCamelCaseThing = (overrides?: Partial<CamelCaseThing>): CamelCaseThing => {
3228+     return {
3229+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '345b9cf9-00fa-4974-800f-aeee5ee7fd42',
3230+     };
3231+ };
3232+ 
3233+ export const aPrefixed_Response = (overrides?: Partial<Prefixed_Response>): Prefixed_Response => {
3234+     return {
3235+         ping: overrides && overrides.hasOwnProperty('ping') ? overrides.ping! : 'sunt',
3236+     };
3237+ };
3238+ 
3239+ export const anAbcType = (overrides?: Partial<AbcType>): AbcType => {
3240+     return {
3241+         abc: overrides && overrides.hasOwnProperty('abc') ? overrides.abc! : 'sit',
3242+     };
3243+ };
3244+ 
3245+ export const aListType = (overrides?: Partial<ListType>): ListType => {
3246+     return {
3247+         stringList: overrides && overrides.hasOwnProperty('stringList') ? overrides.stringList! : ['voluptatem'],
3248+         nullableStringList: overrides && overrides.hasOwnProperty('nullableStringList') ? overrides.nullableStringList! : ['eum'],
3249+     };
3250+ };
3251+ 
3252+ export const anUpdateUserInput = (overrides?: Partial<UpdateUserInput>): UpdateUserInput => {
3253+     return {
3254+         id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : '1d6a9360-c92b-4660-8e5f-04155047bddc',
3255+         login: overrides && overrides.hasOwnProperty('login') ? overrides.login! : 'qui',
3256+         avatar: overrides && overrides.hasOwnProperty('avatar') ? overrides.avatar! : anAvatar(),
3257+     };
3258+ };
3259+ 
3260+ export const aMutation = (overrides?: Partial<Mutation>): Mutation => {
3261+     return {
3262+         updateUser: overrides && overrides.hasOwnProperty('updateUser') ? overrides.updateUser! : aUser(),
3263+     };
3264+ };
3265+ 
3266+ export const aQuery = (overrides?: Partial<Query>): Query => {
3267+     return {
3268+         user: overrides && overrides.hasOwnProperty('user') ? overrides.user! : aUser(),
3269+         prefixed_query: overrides && overrides.hasOwnProperty('prefixed_query') ? overrides.prefixed_query! : aPrefixed_Response(),
3270+     };
3271+ };
3272+ "
3273+ `;
3274+ 
31163275exports[`should use relationshipsToOmit argument to terminate circular relationships with terminateCircularRelationships enabled 1`] = `
31173276"
31183277export const anAvatar = (overrides?: Partial<Avatar>, _relationshipsToOmit: Set<string> = new Set()): Avatar => {
0 commit comments