[GraphQL]: add ValidationErrorType
This commit is contained in:
parent
ad1e3c94a9
commit
3db741b6b6
1 changed files with 11 additions and 0 deletions
11
app/graphql/types/validation_error_type.rb
Normal file
11
app/graphql/types/validation_error_type.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
module Types
|
||||||
|
class ValidationErrorType < Types::BaseObject
|
||||||
|
description "Éreur de validation"
|
||||||
|
|
||||||
|
field :message, String, "A description of the error", null: false
|
||||||
|
|
||||||
|
def message
|
||||||
|
object
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue