Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Blows up when passed a joi schema type with certain unsupported rules #18

@samueljoli

Description

@samueljoli

Context

  • node version: 8
  • environment (node, browser): node

What are you trying to achieve or the steps to reproduce ?

const Joi2GQL = require('joi2gql');
const Joi = require('joi');
const schema = Joi.object().keys({
    prop1: Joi.string().lowercase(),
    prop2: Joi.number().integer(),
    prop3: Joi.object().keys({
        key1: Joi.string(),
        key2: Joi.string()
    })
});

const Schema = Joi2GQL.transmuteType(schema);
const gqlschema = {
    query: {
        schema: Schema
    }
}
const mySchema = Joi2GQL.transmuteSchema(gqlschema);

What result did you expect ?

For a valid GraphQL object to be returned

What result did you observe ?

// Anon.prop1 field type must be Output Type but got: undefined

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions