generated from mizdra/npm-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Type: FixFix bug.Fix bug.
Description
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 passed to defaultFields, but it is not.
type Book {
title: String!
}import { defineBookFactory } from '../__generated__/fabbrica';
const BookFactory = defineBookFactory({
defaultFields: {
title: 'Yuyushiki',
// @ts-expect-error I expect a type error to be reported, but it is not.
unknownField: 'hello',
},
});Step to reproduce
What did you expect to happen?
A type error is reported.
What actually happened?
No type errors are reported.
Participation
- I am willing to submit a pull request for this issue.
Additional comments
It may be necessary to assign a dedicated type parameter for each field.
Metadata
Metadata
Assignees
Labels
Type: FixFix bug.Fix bug.