Giter VIP home page Giter VIP logo

Comments (8)

joshprice avatar joshprice commented on May 18, 2024

Should be possible either way. Feel free to rephrase this as a bug and I'll take a look at it.

from graphql.

AdamBrodzinski avatar AdamBrodzinski commented on May 18, 2024

@joshprice ok will do. I have dead time tomorrow so i'll work on making a reproduction and will re-edit this as a bug.

from graphql.

AdamBrodzinski avatar AdamBrodzinski commented on May 18, 2024

@joshprice I just uploaded a reproduction repo that has a working and notWorking query.
https://github.com/AdamBrodzinski/elixir-graphql-issue-54

These can both be executed with:

GraphQL.execute(TestSchema.schema, "{working {name}}")
GraphQL.execute(TestSchema.schema, "{notWorking {name}}")

and the meat of it is here in web/graphql/test.ex:

        fields: %{
          working: %{
            type: User.type,
            resolve: %{name: "Ted"}
          },
          # should return map with "Bob", instead it returns map with null
          notWorking: %{
            type: User.type,
            resolve: %{"name" => "Bob"}
          }
        }

notWorking should return {:ok, %{data: %{"notWorking" => %{"name" => "Bob"}}}} instead of {:ok, %{data: %{"notWorking" => %{"name" => nil}}}}

from graphql.

joshprice avatar joshprice commented on May 18, 2024

Thanks Adam! I've got a fix for this that I should be able to push up later today.

from graphql.

AdamBrodzinski avatar AdamBrodzinski commented on May 18, 2024

@joshprice if there's anything I can do to help test just let me know!

BTW thanks so much for working on this! I'm working on a GraphQL-RethinkDB example app to show how one can use it with RethinkDB and Phoenix.

from graphql.

joshprice avatar joshprice commented on May 18, 2024

The example app looks great! Is it deployed anywhere? Any chance of linking to it or using as an example in http://playground.graphql-elixir.org/

I didn't manage to get that fix in the last release I'm afraid, still had a couple of things to confirm. Will push something up asap.

from graphql.

AdamBrodzinski avatar AdamBrodzinski commented on May 18, 2024

Thanks! I'll deploy it to Heroku and ad to the playground list once I get the mutations finished.
No worries on the fix, i'm not using it in prod yet anyway.

from graphql.

joshprice avatar joshprice commented on May 18, 2024

Awesome will let you know when I've made the fix. Thanks again!

On Mon, Feb 15, 2016 at 4:11 AM, Adam Brodzinski [email protected]
wrote:

Thanks! I'll deploy it to Heroku and ad to the playground list once I get
the mutations finished.
No worries on the fix, i'm not using it in prod yet anyway.


Reply to this email directly or view it on GitHub
#54 (comment)
.

from 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.