This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-26
Channels
- # adventofcode (15)
- # beginners (7)
- # cider (2)
- # clojure (42)
- # clojure-austin (1)
- # clojure-europe (4)
- # clojure-nl (2)
- # clojurescript (19)
- # core-typed (1)
- # cursive (1)
- # datomic (10)
- # fulcro (30)
- # graphql (8)
- # hoplon (28)
- # hyperfiddle (16)
- # jobs (1)
- # off-topic (2)
- # philosophy (1)
- # re-frame (1)
- # shadow-cljs (30)
- # vim (3)
Lacinia usage question: I've been writing specs for input objects in order to: 1. specify more precise constaints than expressible w/ GraphQL's types and 2. to generate input data for tests. This is suboptimal though b/c I end up validating input twice and, since I'm using the specs as input generators I end up duplicating the graphql schema in the spec definitions completely. Due to the inevitable cyclic dependency, I cannot reference the compiled lacinia schema from the spec namespace that is need in the resolvers (for conforming/validating input). How do others generate input and add additional input constraints?
@solussd I used Kafka with avro schema's for the input, using specific generated Java classes. So I didn't need additional constraints on the input.
@solussd Serene (https://github.com/paren-com/serene) will generate specs for your schema (including input types) and allows extension. I think it will solve the issues you're facing.
how do you debug this error from a lacinia spec ?
Introspection must provide output type for fields.
at invariant ()
at getOutputType ()
at
at
at Array.reduce (<anonymous>)
at keyValMap ()
at buildFieldDefMap ()
at fields ()
at resolveThunk ()
at defineFieldMap ()
Given (partial spec):
....
{:objects
:ApplicationDataOutput
{:description ""
:fields {:application_id {:type ID}
:app_transaction_id {:type ID}
:borrower_loan_person_id {:type ID}
:cosigner_loan_person_id {:type ID}
:student_loan_person_id {:type ID}
:fulfillment_application_id {:type ID}
:data_save_completed {:type Boolean}
:borrower_is_age_of_majority {:type Boolean}
:cosigner_is_age_of_majority {:type Boolean}
:is_no_ssn {:type Boolean}
:is_assigned_admin_id {:type Boolean}}}
:input-objects
{:ApplicationDataInput
{:description ""
:fields {:application_started_user_type {:type String}
:request_user_type {:type String}
:validation_group_list {:type (list String)}}}
:mutations
{:save_application_data {:type :ApplicationDataOutput
:description "Save application data"
:args {:data {:type :ApplicationDataInput}}
:resolve :mutation/save-application-data}}
}
Rootcause seems to be save_application_data
mutation