Revision 0f61f53b
Added by Timo Goebel about 5 years ago
app/graphql/foreman_graphql_schema.rb | ||
---|---|---|
use GraphQL::Batch
|
||
|
||
query(Types::Query)
|
||
mutation(Types::Mutation)
|
||
|
||
rescue_from ActiveRecord::RecordInvalid, &:message
|
||
rescue_from ActiveRecord::Rollback, &:message
|
||
rescue_from StandardError, &:message
|
||
rescue_from ActiveRecord::RecordNotUnique, &:message
|
||
rescue_from ActiveRecord::RecordNotFound, &:message
|
||
|
||
def self.id_from_object(object, type_definition, query_ctx)
|
||
Foreman::GlobalId.encode(type_definition.name, object.id)
|
Also available in: Unified diff
fixes #24008 - add graphql mutations