evo-company / hiku

Library to write servers for GraphQL-like query languages
http://hiku.readthedocs.io
BSD 3-Clause "New" or "Revised" License
60 stars 13 forks source link

Allow input arguments using Record to have default value #169

Open kindermax opened 1 month ago

kindermax commented 1 month ago

Now if we use data_type for input arguments such as

Graph([
  Root([
    Link("create", TypeRef["CreateInput"], link_fn)
  ])
], data_types={
  "CreateInput": Record[{"id": Integer, "name": Optional[String]}]
})

We can not set default value for a id or name fields of a CreateInput data_type