Add dossier champs and annotations types

This commit is contained in:
Paul Chavard 2019-08-28 11:25:41 +02:00
parent 1c10718c11
commit eb7aba18e6
25 changed files with 454 additions and 3 deletions

View file

@ -31,6 +31,22 @@ class Api::V2::Schema < GraphQL::Schema
end
end
orphan_types Types::Champs::CarteChampType,
Types::Champs::CheckboxChampType,
Types::Champs::DateChampType,
Types::Champs::DecimalNumberChampType,
Types::Champs::DossierLinkChampType,
Types::Champs::IntegerNumberChampType,
Types::Champs::LinkedDropDownListChampType,
Types::Champs::MultipleDropDownListChampType,
Types::Champs::PieceJustificativeChampType,
Types::Champs::RepetitionChampType,
Types::Champs::SiretChampType,
Types::Champs::TextChampType,
Types::GeoAreas::ParcelleCadastraleType,
Types::GeoAreas::QuartierPrioritaireType,
Types::GeoAreas::SelectionUtilisateurType
def self.unauthorized_object(error)
# Add a top-level error to the response instead of returning nil:
raise GraphQL::ExecutionError.new("An object of type #{error.type.graphql_name} was hidden due to permissions", extensions: { code: :unauthorized })