graphql-codegen-typescript-fabbrica
graphql-codegen-typescript-fabbrica copied to clipboard
GraphQL Code Generator Plugin to define fake data factory.
### Environment @mizdra/graphql-codegen-typescript-fabbrica version: 0.5.0 typescript version (optional): 5.4.2 @graphql-codegen/cli version (optional): 5.0.2 @graphql-codegen/typescript version (optional):4.0.6 ### Summary The file I'm generating is incomplete (basically empty). It looks like this:...
## Motivation - The `get` function does not return a usable type. - The type of `get('author')` is `Promise`. - `OptionalAuthor` means `{ id?: string | undefined, name?: string |...
Add a utility that allows users to build connections without defining `XxxEdgeFactory` or `XxxConnectionFactory`. ## Example ```ts import { defineBookFactory, dynamic } from '../__generated__/fabbrica'; const PageInfoFactory = definePageInfoFactory({ defaultFields: {...
### Environment @mizdra/graphql-codegen-typescript-fabbrica version: 0.3.2 typescript version (optional): @graphql-codegen/cli version (optional): @graphql-codegen/typescript version (optional): ### Summary I would expect a type error to be reported when an unknown field is...
This problem occurs with factories where no traits are defined. https://stackblitz.com/edit/playground-graphql-codegen-typescript-fabbrica-1ryp1f?file=src%2Findex.test.ts&view=editor ```ts import { defineBookFactory, defineAuthorFactory, dynamic, } from '../__generated__/fabbrica'; import { test, expect, expectTypeOf } from 'vitest'; // Define...
Global Transient Fields can define special Transient Fields that also affects `build` methods called on deep stacks. ```ts import { defineBookFactory, defineBookShelfFactory, } from '../__generated__/fabbrica'; declare module '@mizdra/graphql-codegen-typescript-fabbrica/helper' { interface...
- https://github.com/facebook/relay/issues/4442 - https://github.com/dotansimha/graphql-code-generator/issues/9666
Hello. First of all thanks for the plugin! It has many great features. My question is related to operation/fragment mocks. Did you consider such a feature to support creating mocks...