Merge pull request #4720 from tchak/graphql-big-int
[GraphQL] Use GraphQL::Types::BigInt instead of Int
This commit is contained in:
commit
ea4bb93bba
4 changed files with 13 additions and 5 deletions
|
@ -18,6 +18,12 @@ type Avis {
|
|||
reponse: String
|
||||
}
|
||||
|
||||
"""
|
||||
Represents non-fractional signed whole numeric values. Since the value may
|
||||
exceed the size of a 32-bit integer, it's encoded as a string.
|
||||
"""
|
||||
scalar BigInt
|
||||
|
||||
type CarteChamp implements Champ {
|
||||
geoAreas: [GeoArea!]!
|
||||
id: ID!
|
||||
|
@ -648,7 +654,7 @@ enum DossierState {
|
|||
}
|
||||
|
||||
type Entreprise {
|
||||
capitalSocial: Int!
|
||||
capitalSocial: BigInt!
|
||||
codeEffectifEntreprise: String!
|
||||
dateCreation: ISO8601Date!
|
||||
formeJuridique: String!
|
||||
|
@ -730,7 +736,7 @@ type IntegerNumberChamp implements Champ {
|
|||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
value: Int
|
||||
value: BigInt
|
||||
}
|
||||
|
||||
type LinkedDropDownListChamp implements Champ {
|
||||
|
|
|
@ -2,7 +2,7 @@ module Types::Champs
|
|||
class IntegerNumberChampType < Types::BaseObject
|
||||
implements Types::ChampType
|
||||
|
||||
field :value, Int, null: true
|
||||
field :value, GraphQL::Types::BigInt, null: true
|
||||
|
||||
def value
|
||||
if object.value.present?
|
||||
|
|
|
@ -2,7 +2,7 @@ module Types
|
|||
class PersonneMoraleType < Types::BaseObject
|
||||
class EntrepriseType < Types::BaseObject
|
||||
field :siren, String, null: false
|
||||
field :capital_social, Int, null: false
|
||||
field :capital_social, GraphQL::Types::BigInt, null: false
|
||||
field :numero_tva_intracommunautaire, String, null: false
|
||||
field :forme_juridique, String, null: false
|
||||
field :forme_juridique_code, String, null: false
|
||||
|
|
|
@ -308,6 +308,7 @@ describe API::V2::GraphqlController do
|
|||
entreprise {
|
||||
siren
|
||||
dateCreation
|
||||
capitalSocial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -330,7 +331,8 @@ describe API::V2::GraphqlController do
|
|||
siegeSocial: dossier.etablissement.siege_social,
|
||||
entreprise: {
|
||||
siren: dossier.etablissement.entreprise_siren,
|
||||
dateCreation: dossier.etablissement.entreprise_date_creation.iso8601
|
||||
dateCreation: dossier.etablissement.entreprise_date_creation.iso8601,
|
||||
capitalSocial: dossier.etablissement.entreprise_capital_social.to_s
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue