Skip to content
This repository was archived by the owner on Feb 10, 2019. It is now read-only.

Commit 02d66fd

Browse files
committed
Add rules function to stubs for generating Fields
1 parent 364f051 commit 02d66fd

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

src/Folklore/GraphQL/Console/stubs/field.stub

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ class DummyClass extends Field
3939
];
4040
}
4141

42+
/**
43+
* Overwrite rules at any part in the tree of field arguments.
44+
*
45+
* The rules defined in here take precedence over the rules that are
46+
* defined inline or inferred from nested Input Objects.
47+
*
48+
* @return array
49+
*/
50+
public function rules()
51+
{
52+
return [];
53+
}
54+
4255
/**
4356
* Return a result for the field which should match up with its return type.
4457
*

src/Folklore/GraphQL/Console/stubs/mutation.stub

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ class DummyClass extends Mutation
3939
];
4040
}
4141

42+
/**
43+
* Overwrite rules at any part in the tree of field arguments.
44+
*
45+
* The rules defined in here take precedence over the rules that are
46+
* defined inline or inferred from nested Input Objects.
47+
*
48+
* @return array
49+
*/
50+
public function rules()
51+
{
52+
return [];
53+
}
54+
4255
/**
4356
* Return a result for the field which should match up with its return type.
4457
*

src/Folklore/GraphQL/Console/stubs/query.stub

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ class DummyClass extends Query
3939
];
4040
}
4141

42+
/**
43+
* Overwrite rules at any part in the tree of field arguments.
44+
*
45+
* The rules defined in here take precedence over the rules that are
46+
* defined inline or inferred from nested Input Objects.
47+
*
48+
* @return array
49+
*/
50+
public function rules()
51+
{
52+
return [];
53+
}
54+
4255
/**
4356
* Return a result for the field which should match up with its return type.
4457
*

0 commit comments

Comments
 (0)