Merge pull request #5020 from tchak/fix-graphql-groupe-instructeur-type

[GraphQL] fix groupe instructeur type definition
This commit is contained in:
Keirua 2020-04-09 09:26:22 +02:00 committed by GitHub
commit 7e806f191c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,13 +5,13 @@ module Types
global_id_field :id
field :label, String, null: false
field :instructeurs, [Types::ProfileType], null: false
end
def instructeurs
Loaders::Association.for(object.class, :instructeurs).load(object)
end
def instructeurs
Loaders::Association.for(object.class, :instructeurs).load(object)
end
def self.authorized?(object, context)
authorized_demarche?(object.procedure, context)
def self.authorized?(object, context)
authorized_demarche?(object.procedure, context)
end
end
end