Code Monkey home page Code Monkey logo

graphql-mapper-demo's People

Contributors

4rthem avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

graphql-mapper-demo's Issues

Demo not working for me

Hey! Hoping you can help.

I'm trying to get the demo up and running.

I've made a few minor changes to make things happier with postgres, but effectively still the same. Doctrine works fine. I can seed the database.

But when I get to making a call...

$ php -S localhost:8000
PHP 5.6.30 Development Server started at Mon Jul  3 09:48:10 2017
Listening on http://localhost:8000
Document root is /Users/jmather/code/php/graphql-mapper-demo
Press Ctrl-C to quit.
curl -XPOST 'http://localhost:8000/entry.php' -d 'query=query FooBar {
    luke: hero(episode: EMPIRE) {
        id,
        name,
        friends {
            id, name
        }
    },
    droid(id: "2001") {
        primaryFunction
    }
}'
[Mon Jul  3 09:48:36 2017] ::1:56052 [200]: /entry.php - Call to a member function addImplementation() on string in /Users/jmather/code/php/graphql-mapper-demo/vendor/webonyx/graphql-php/src/Type/Definition/InterfaceType.php on line 54

Tracing this down further, that code is:

    /**
     * Queue the update of the interfaces to know about this implementation.
     * This is an rare and unfortunate use of mutation in the type definition
     * implementations, but avoids an expensive "getPossibleTypes"
     * implementation for Interface types.
     *
     * @param ObjectType $impl
     */
    public static function addImplementationToInterfaces(ObjectType $impl)
    {
        self::$_lazyLoadImplementations[] = function() use ($impl) {
            /** @var self $interface */
            foreach ($impl->getInterfaces() as $interface) {
                $interface->addImplementation($impl); // here
            }
        };
    }

So what IS $interface, if it's not the InterfaceType we expect but a STRING?!

objecttype_php_-_graphql-mapper-demo_-____code_php_graphql-mapper-demo_

or viewed another way...

objecttype_php_-_graphql-mapper-demo_-____code_php_graphql-mapper-demo_

It looks like somewhere there's a conversion not happening. Any ideas?

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.