Giter Site home page Giter Site logo

Comments (6)

Jayshua avatar Jayshua commented on July 1, 2024 1

Looks like you have a list of nothing?

"ofType": {
   "kind": "LIST",
   "name": null
}

from elm-graphql.

dillonkearns avatar dillonkearns commented on July 1, 2024

It looks like the GraphQL schema is returning an invalid response.

The GraphQL Spec describes it here https://spec.graphql.org/draft/#sec-The-__Type-Type.Non-Null

It says that for NON_NULL types:

  • kind must return __TypeKind.NON_NULL.
  • ofType must return a type of any kind except Non-Null.
  • All other fields must return null.

(Emphasis added to relevant section). So it looks like it's a bug with the library or server-side framework.

from elm-graphql.

atomkirk avatar atomkirk commented on July 1, 2024

ahhhh

Kirk Screenshot 2021-07-06 at 10 17 45@2x

ok, I see it now. yep, the server lib shouldn't allow that

from elm-graphql.

dillonkearns avatar dillonkearns commented on July 1, 2024
Kirk Screenshot 2021-07-06 at 10 17 45@2x

ok, I see it now. yep, the server lib shouldn't allow that

Right, yeah it's just an extra type wrapper that doesn't add any meaning, which is why the GraphQL Spec disallows it. Let me know what the root turns out to be and what you find, I'm curious whether it's from a user-defined double-non-null, or just the server framework (or a plugin) adding the double non-null.

from elm-graphql.

atomkirk avatar atomkirk commented on July 1, 2024

the double non-null was my own code. But now that I've fixed that, I think the

"ofType": {
   "kind": "LIST",
   "name": null
}

is a bug in the server lib. if i remove the non_null decorators, it works

from elm-graphql.

dillonkearns avatar dillonkearns commented on July 1, 2024

Gotcha, thanks for the info! It might be nice to improve the error message in this particular case, too. Something like:

I found a double non-null. This should probably be a single non-null, maybe check if your types have a redundant non-null somewhere? See https://spec.graphql.org/June2018/#sec-Type-Kinds.Non-Null

from elm-graphql.

Related Issues (20)

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.