Skip to content

Commit

Permalink
Fix alias for mutation function
Browse files Browse the repository at this point in the history
  • Loading branch information
murtukov committed Jan 30, 2021
1 parent 4d0aaf9 commit 9bd4c91
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Resources/config/expression_language_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:

expression_function.mutation_alias:
class: Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\GraphQL\Mutation
arguments: { $name : 'mut' }
arguments: { $name : 'm' }

expression_function.query_alias:
class: Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\GraphQL\Query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Mutation:
fields:
cascadeOnScalar:
type: Boolean
resolve: '@=mut("mutation_mock", [args, validator])'
resolve: '@=m("mutation_mock", args, validator)'
args:
test:
type: "String"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Mutation:
fields:
constraintDoesNotExist:
type: Boolean
resolve: '@=mut("mutation_mock", [args, validator])'
resolve: '@=m("mutation_mock", args, validator)'
args:
username:
type: "String"
Expand Down
20 changes: 10 additions & 10 deletions tests/Functional/App/config/validator/mapping/Mutation.types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Mutation:
complexity: 1
public: true
type: Boolean
resolve: "@=mut('no_validation')"
resolve: "@=m('no_validation')"
args:
username:
type: String!
Expand All @@ -15,7 +15,7 @@ Mutation:

simpleValidation:
type: Boolean
resolve: "@=mut('mutation_mock', args, validator)"
resolve: "@=m('mutation_mock', args, validator)"
args:
username:
type: String!
Expand All @@ -27,7 +27,7 @@ Mutation:

linkedConstraintsValidation:
type: Boolean
resolve: "@=mut('mutation_mock', args, validator)"
resolve: "@=m('mutation_mock', args, validator)"
validation:
link: Overblog\GraphQLBundle\Tests\Functional\Validator\DummyEntity
constraints:
Expand All @@ -45,7 +45,7 @@ Mutation:

collectionValidation:
type: Boolean
resolve: "@=mut('mutation_mock', args, validator)"
resolve: "@=m('mutation_mock', args, validator)"
args:
addresses:
type: "[Address]!"
Expand All @@ -61,7 +61,7 @@ Mutation:

cascadeValidationWithGroups:
type: Boolean
resolve: '@=mut("mutation_mock", args, validator)'
resolve: '@=m("mutation_mock", args, validator)'
args:
groups:
type: "[String]!"
Expand All @@ -76,7 +76,7 @@ Mutation:

userPasswordValidation:
type: Boolean
resolve: '@=mut("mutation_mock", args, validator)'
resolve: '@=m("mutation_mock", args, validator)'
args:
oldPassword:
type: "String"
Expand All @@ -85,7 +85,7 @@ Mutation:

expressionVariablesValidation:
type: Boolean
resolve: '@=mut("mutation_mock", args, validator)'
resolve: '@=m("mutation_mock", args, validator)'
args:
username:
type: "String"
Expand All @@ -94,7 +94,7 @@ Mutation:

autoValidationAutoThrow:
type: Boolean
resolve: '@=mut("mutation_mock", args)'
resolve: '@=m("mutation_mock", args)'
args:
username:
type: String!
Expand All @@ -106,7 +106,7 @@ Mutation:

autoValidationNoThrow:
type: Boolean
resolve: '@=mut("mutation_errors", errors)'
resolve: '@=m("mutation_errors", errors)'
args:
username:
type: String!
Expand All @@ -118,7 +118,7 @@ Mutation:

autoValidationAutoThrowWithGroups:
type: Boolean
resolve: '@=mut("mutation_mock", args)'
resolve: '@=m("mutation_mock", args)'
validationGroups: ["Default", "Address", "Period", "group1", "group2"]
args:
address:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Mutation:
fields:
noValidationDefined:
type: Boolean
resolve: '@=mut("mutation_mock", args, validator)'
resolve: '@=m("mutation_mock", args, validator)'
args:
username:
type: "String"

0 comments on commit 9bd4c91

Please sign in to comment.