Code Monkey home page Code Monkey logo

speako's People

Contributors

johanatan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

joelgardner

speako's Issues

Result of mutations should be array

To facilitate mutations that result in multiple items being created/updated/deleted, it'd be nice to have the result type be an array ([Foo]) rather than a singular object (Foo).

Certain inputs disallow proper parsing of predicate passed to resolvers

If we have a query like { Foo (username: "jim" password: "asdf=d&asdf") { ... } }, speako will pass username=jim&password=asdf=d&asdf as the predicate to the resolvers, which is nigh unparseable. Perhaps it'd be easier for the resolver if we passed an object instead: {username: "jim", password: "asdf=d&asdf".

array of union types appears to be broken as field for object

Jonathans-MacBook-Pro:speako jonathan$ node examples/core.js 
Created enum type: Episode: descriptor: {:name "Episode", :values {"NEWHOPE" {:value 1}, "EMPIRE" {:value 2}, "JEDI" {:value 3}}}
Created object type thunk: Human
Created input object type thunk: HumanInput for type: Human
Created object type thunk: Droid
Created input object type thunk: DroidInput for type: Droid
Created union type: Character: descriptor: {:name "Character", :types (#object[GraphQLObjectType Human] #object[GraphQLObjectType Droid]), :resolveType #object[Function "function (a){a=cljs.core.keys.call(null,cljs.core.js__GT_clj.call(null,a));return cljs.core.get.call(null,cljs.core.deref.call(null,k.type_map),cljs.core.first.call(null,cljs.core.get.call(null,cljs.core.deref.call(null,k.fields_map),a)))}"]}
/Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/jsutils/invariant.js:19
    throw new Error(message);
    ^

Error: RootQuery.Droid(friends:) argument type must be Input Type but got: [Character].
    at invariant (/Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/jsutils/invariant.js:19:11)
    at /Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/type/definition.js:335:33
    at Array.map (native)
    at /Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/type/definition.js:332:44
    at Array.forEach (native)
    at defineFieldMap (/Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/type/definition.js:318:14)
    at GraphQLObjectType.getFields (/Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/type/definition.js:276:44)
    at /Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/type/schema.js:207:27
    at typeMapReducer (/Users/jonathan/Documents/SourceCode/speako/node_modules/graphql/type/schema.js:219:7)
    at Array.reduce (native)

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.