Git Product home page Git Product logo

joi2gql's People

Contributors

samueljoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

samueljoli

joi2gql's Issues

Refactor and Clean

  1. Take a more defensive approach to traversing deeply nested properties. Should use Hoek.reach() api.
  1. Refactor unit and integration tests. Remove GITS references.

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

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

Support for joi 17+

Over on Gatsby I've been upgrading joi to the latest version. However this is the final holdout to make that happen. It looks like there are a number of changes made to joi that make this library incompatible.

Things like schema._tests and schema._flags aren't supported as they are for internal use.

Are there any plans to support the latest joi?

Support all scalar/definition types

Support all scalar/definition types in type-dictionary

Scalar

  • GraphQLInt,
  • GraphQLFloat,
  • GraphQLString,
  • GraphQLBoolean,
  • GraphQLID

Definitions

  • GraphQLScalarType,
  • GraphQLObjectType,
  • GraphQLInterfaceType,
  • GraphQLUnionType,
  • GraphQLEnumType,
  • GraphQLInputObjectType,
  • GraphQLList,
  • GraphQLNonNull,
  • GraphQLDirective,

Are you going to update this package?

Context

  • node version: 18.5
  • environment (node, browser): chrome
  • any relevant modules used with express, express-graphql
  • any other relevant information:

I was thinking of using this package in a live project but it was last updated 5 years ago so I was wondering when you are going to update it?

Support custom graphql scalar types as args

Context

  • node version:
  • environment (node, browser):
  • any relevant modules used with (hapi, hoek, etc.):
  • any other relevant information:

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

What result did you expect ?

What result did you observe ?

Support Subscriptions

Context

  • node version:
  • environment (node, browser):
  • any relevant modules used with (hapi, hoek, etc.):
  • any other relevant information:

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

What result did you expect ?

What result did you observe ?

Support Descriptions

Context

  • node version:
  • environment (node, browser):
  • any relevant modules used with (hapi, hoek, etc.):
  • any other relevant information:

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

What result did you expect ?

What result did you observe ?

Support Mutations

Context

  • node version:
  • environment (node, browser):
  • any relevant modules used with (hapi, hoek, etc.):
  • any other relevant information:

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

What result did you expect ?

What result did you observe ?

Async Await

Context

  • node version:
  • environment (node, browser):
  • any relevant modules used with (hapi, hoek, etc.):
  • any other relevant information:

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

What result did you expect ?

What result did you observe ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.