Commit graph

106 commits

Author SHA1 Message Date
Paul Chavard
1399d9bba9 feat(graphql): expose demarche descriptor on dossier type
We don't want to expose full demarche type on dossiers because it would open the door for recursive queries that we want to avoid. DemarcheDescriptorType is a lightweight representation of demarche metadata.
2021-08-25 11:12:24 +02:00
Paul Chavard
a4482233b8 [GraphQL] expose deleted dossiers 2021-06-24 11:51:37 +02:00
Paul Chavard
3071af220a Add revision date_publication 2021-06-03 13:11:16 +02:00
Paul Chavard
990ae10399 GraphQL byte_size should be BigInt 2021-06-03 10:53:17 +02:00
Paul Chavard
bd7bb2d0d2 Fix apostrophes ‘ -> ’ 2021-05-26 15:09:23 +02:00
Paul Chavard
18ce027b84 Update dossier serialize query to stop using deprecated fileds 2021-05-26 11:12:06 +02:00
Paul Chavard
3b85ade440 Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +02:00
Pierre de La Morinerie
b8f71bd52c i18n: fix enum values for Dossier.state
According to Rails i18n guide, enum values should be localized
as `<model>/<enum>`, not as sub-values to the attribute.

This fixes an exception in administrate when displaying a Dossier
in the Manager.

Note: we need to change the way GraphQL attributes are generated, because
`AASM::Core::State#display_name` doesn’t honor the `model/attribute.value`
convention (and instead tries to localize as `model.attribute/value`).
So instead we lookup the localized name using ActiveRecord.
2021-05-06 14:38:25 +02:00
Paul Chavard
a4fd629f4a Enable user destruction 2021-05-04 12:05:06 +02:00
François Vantomme
cb717aede2 Fix (GraphQL): raise exception when blob is missing
Failures:

  1) API::V2::GraphqlController when authenticated mutations dossierEnvoyerMessage upload error should fail
     Failure/Error: expect(gql_errors).to eq(nil)

       expected: nil
            got: [{:backtrace=>["/usr/local/bundle/ruby/2.7.0/gems/graphql-1.12.5/lib/graphql/backtrace/tracer.rb:64:i...]
2021-05-04 11:26:23 +02:00
Paul Chavard
c20ad5ca17 Remove the link between commentaire and user 2021-04-22 15:10:47 +01:00
kara Diaby
fff6725799 modify api and serializer 2021-03-24 17:47:24 +01:00
kara Diaby
a710116371 add expert profile to api 2021-03-18 11:27:51 +01:00
Paul Chavard
e96d2fb083 Return empty strings for incomplete api entreprise adresses 2021-03-17 12:12:21 +01:00
Paul Chavard
a6fe1df201 update graphql schema 2021-03-17 11:53:48 +01:00
Paul Chavard
4efc5ff273 Update app/graphql/schema.graphql
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-03-17 11:53:48 +01:00
Paul Chavard
046b36d386 Update app/graphql/schema.graphql
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-03-17 11:53:48 +01:00
Paul Chavard
866ae256a3 Add revision dossiers filters 2021-03-17 11:53:48 +01:00
Paul Chavard
bee66d41c4 capital_social and numero_tva_intracommunautaire can be null 2021-03-11 11:13:50 +01:00
Paul Chavard
9c3e72c84a Use revision instead of groupe instructeur as dossier procedure link 2021-03-09 14:47:23 +01:00
Paul Chavard
82fca8be0b Make more association fields nullable 2021-03-05 10:13:22 +01:00
Paul Chavard
47e232f439 Some associations have no date_creation 2021-03-04 16:28:20 +01:00
Paul Chavard
79606e8696 Some addresses have no street_address 2021-03-04 12:52:01 +01:00
Paul Chavard
bb072ba9e9 Add id argument to most collections on dossier 2021-03-02 12:42:22 +01:00
Paul Chavard
0bd8721776 Add a way to authoraize any query through context 2021-03-02 12:35:47 +01:00
Paul Chavard
a0b53d7d80 Expose structured address on the API
fix #4290
2021-02-17 19:10:16 +01:00
Pierre de La Morinerie
b04afed20e gems: update graphql 2021-02-16 16:31:30 +00:00
Paul Chavard
9ce07be1ee [GraphQL] modifier annotation 2021-02-11 17:45:14 +01:00
Pierre de La Morinerie
150ddab660 zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
Paul Chavard
0223eabcce fix annotations n+1 2021-02-08 10:41:36 +01:00
Paul Chavard
a26537c77d Make some api entreprise fields optional 2021-01-27 11:53:00 +01:00
Paul Chavard
54f2084aef Add annuaire_education champ 2021-01-14 17:57:48 +01:00
Paul Chavard
dc08993a89 Add DateTime champ to GraphQL 2021-01-14 14:08:42 +01:00
Paul Chavard
d509fe2edb GraphQL: add has_fragment to context 2021-01-12 16:24:14 +01:00
Paul Chavard
7a8b1fa639 [GraphQL] hide dossiers brouillon from api 2020-12-18 16:34:42 +01:00
Paul Chavard
09128cb85e Add titre identite champ to GraphQL 2020-12-17 17:23:34 +01:00
Paul Chavard
43976550cf GraphQL: make parts of address nullable 2020-12-15 17:57:37 +01:00
Paul Chavard
fed300bfe1 Fix and test ActiveStorage::IntegrityError on upload 2020-12-11 10:30:17 +01:00
Paul Chavard
65d650eba6 Better graphql mutation error messages 2020-12-10 18:35:24 +01:00
Paul Chavard
cad8ee31d8 Remove legacy geo sources 2020-12-10 11:26:16 +01:00
Paul Chavard
00ef56db10 [GraphQL] fix attachment upload
- `identify` will return `true` sometime
2020-11-25 10:46:20 +01:00
Paul Chavard
b897e0cc1c [GraphQL] add better errors when attachments are not properly used 2020-11-17 12:40:14 +01:00
Paul Chavard
e74c32446e Fix champ->type_de_champ n+1 2020-11-12 15:48:31 +01:00
Paul Chavard
20cdefad63 GraphQL: bump timeout to 10 sec 2020-11-06 12:00:00 +01:00
Paul Chavard
7c58f06c60 always validate geometries returned from api 2020-10-08 16:03:28 +02:00
Paul Chavard
e9ed3dcb92 Update graphql schema 2020-10-06 21:54:44 +02:00
Paul Chavard
393dc9578d Fix apostrophes 2020-10-06 21:54:43 +02:00
Paul Chavard
0aa06d0197 [GraphQL] expose dossier pdf, geojson and attestation 2020-10-06 21:54:43 +02:00
kara Diaby
cb4e91c405 Add iban type de champ 2020-09-23 15:56:26 +02:00
Paul Chavard
061a743759 [GraphQL] Add archiver mutation 2020-09-22 08:34:38 +00:00