Giter Club home page Giter Club logo

graphql-api's People

Contributors

advancingu avatar shanedaugherty avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

shanedaugherty

graphql-api's Issues

Data of unions with non-Entry members is not discernible after serialization

Consider the following schema:

directive @Entry on OBJECT

type Page @Entry {
    id: ID!
    contentElements: [ContentElement!]
}

union ContentElement =
    | Hero
    | SectionTitle

type Hero {
    heading: String
}

type SectionTitle {
    heading: String
}

Actual result

After serialization, the type information is lost, i.e. it is no longer possible to tell which concrete type within the union type was stored in the array of contentElements. It is therefore impossible to correctly deserialize this data.

Expected result

Type information is preserved within the serialized data.

Github adapter repo is missing

In the readme you are linking to git-adapter-github.
However, this is a 404. There is no such repo, at least not public.

I'm currently trying out the github adapter and I think I found a bug but cannot report it.

Querying optional reference field with null value causes exception

Preconditions

Schema

directive @Entry on OBJECT

type MyEntry @Entry {
    id: ID!
    name: String
    reference: OtherEntry
}

type OtherEntry @Entry {
    id: ID!
    foo: String
}

Entry

metadata:
  type: MyEntry
data:
  name: Test
  reference: null

Actual behavior

Trying to query field reference causes exception.

Expected behavior

Querying reference returns a value of null.

Invalid GraphQL schema generated when an Entry has no fields other than ID

Steps to reproduce

  1. Commit the following schema:
directive @Entry on OBJECT

type MyTest @Entry {
    id: ID!
}
  1. Try to use the Contentlab GraphQL endpoint based on this schema

Actual result

The input type MyTestInput for createMyTest(data:MyTestInput, message:String): MyTest and updateMyTest(id: ID!, data:MyTestInput, message:String): MyTest is generated as follows:

input MyTestInput {
}

This is invalid GraphQL as every type must have at least one field.

Expected result

Either an explicit error message indicating that a field is required or an auto-generated dummy field.

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.