holidayextras / jsonapi-server

A config driven NodeJS framework implementing json:api and GraphQL
MIT License
488 stars 115 forks source link

Joi object type cannot be converted to graphQL #244

Open futurist opened 7 years ago

futurist commented 7 years ago

When joi type is joi.object(), graphQl seems cannot convert it:

/home/public_html/jsonapi-server/lib/graphQl/joiConverter.js:38
    throw new Error('Unable to parse Joi type, got ' + JSON.stringify(joiScheme))
    ^

Error: Unable to parse Joi type, got {"isJoi":true,"_type":"object","_settings":null,"_valids":{"_set":[]},"_invalids":{"_set":[]},"_tests":[],"_refs":[],"_flags":{},"_description":null,"_unit":null,"_notes":[],"_tags":[],"_examples":[],"_meta":[],"_inner":{"children":null,"renames":[],"dependencies":[],"patterns":[]}}
oliversalzburg commented 7 years ago

It also can't handle .any().