Skip to content

Commit f5afddf

Browse files
committed
chore(graphql-test): adds more configuration
1 parent 477a6a9 commit f5afddf

File tree

3 files changed

+69
-64
lines changed

3 files changed

+69
-64
lines changed

packages/graphql-test/src/generator-options.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface OptionsBase<
3838
export declare namespace Constraints {
3939
type Argument = fc.UniqueArrayConstraints<any, any>
4040
type Directive = fc.UniqueArrayConstraints<any, any>
41+
type DirectiveDefinition = fc.UniqueArrayConstraints<any, any>
4142
type Document = fc.UniqueArrayConstraints<any, any>
4243
type EnumTypeDefinition = fc.UniqueArrayConstraints<any, any>
4344
type InputValueDefinition = fc.UniqueArrayConstraints<any, any>
@@ -56,7 +57,7 @@ export type Constraints = {
5657
Boolean?: {}
5758
BooleanValue?: {}
5859
Directive?: Constraints.Directive
59-
DirectiveDefinition?: {}
60+
DirectiveDefinition?: Constraints.DirectiveDefinition
6061
Document?: Constraints.Document
6162
EnumTypeDefinition?: Constraints.EnumTypeDefinition
6263
EnumValue?: {}
@@ -112,7 +113,10 @@ export const defaultConstraints = {
112113
selector: ([, name]) => name,
113114
size: 'xsmall',
114115
},
115-
DirectiveDefinition: {},
116+
DirectiveDefinition: {
117+
minLength: 1,
118+
maxLength: 3,
119+
},
116120
Document: {
117121
minLength: 1,
118122
maxLength: 5,
@@ -174,7 +178,7 @@ export const defaultConstraints = {
174178
ObjectValue: {
175179
minLength: 1,
176180
maxLength: 3,
177-
selector: ([k]) => k,
181+
selector: ([key]) => key,
178182
size: 'xsmall',
179183
},
180184
OperationDefinition: {

0 commit comments

Comments
 (0)