Giter Club home page Giter Club logo

graphql-examples's People

Contributors

exaspark avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

graphql-examples's Issues

eventCreate mutation - uploading coverPhoto & eventPhoto

I can see that both coverPhoto & eventPhoto take ImageInputType which requires uploadId of an image. Which means I have to use an already uploaded imageid from a previously created event that was not created via the api.

Right now, if I want to use the api to create events and have cover photo and an event photo, I have to have a hidden draft event which stores various images and then fetch the correct ID from api and parse it to the mutation event, which is not ideal.

Is there a mutation for uploading an Image via the api or an endpoint for uploading images and getting uploadid in response?

Thanks.

Invalid default value for a `clauses` argument

Recently I noticed that Universe GraphQL schema has changed a bit and new JSON scalar type as well as a default value were introduced. In the introspection JSON it looks like this:

{
  "defaultValue" : "[]",
  "description" : "array of {key: value} or 'string' where clauses",
  "name" : "clauses",
  "type" : {
    "kind" : "SCALAR",
    "name" : "JSON",
    "ofType" : null
  }
}

Based on my understanding of the GraphQL spec, the default value [] is not compatible the the argument type. According to the GraphQL spec:

defaultValue may return a String encoding (using the GraphQL language) of the default value used by this input value in the condition a value is not provided at runtime. If this input value has no default value, returns null.

The argument type is a simple scalar value. This means that it can't have value like [] (the default value is described with GraphQL syntax, not JSON). I'm not sure how JSON scalar type is implemented internally, but if it is represented with a String literal, then the default value should be something like "defaultValue": "\"[]\"".

I was not 100% sure where to report this issue, so I decided to put it here. Would be great if somebody could look into it.

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.