Git Product home page Git Product logo

ariadne-extensions's People

Contributors

aleszoulek avatar greg-1-anderson avatar kporras07 avatar whiskybar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ariadne-extensions's Issues

Undocumented `AriadneMeta` property

While implementing Ariadne with Federation on top of my Flask Sqlalchemy app I have found an issue having my PublicUserNode shared with other services on my apollo federation setup. I kept getting this error:

Abstract type _Entity must resolve to an Object type at runtime for field Query._entities with value <User instance>, received 'None'. Either the _Entity type should provide a "resolve_type" function or each possible type should provide an "is_type_of" function.

The reason why I was getting it its because FederationManager._entity_type_resolver was looking for the type name either on the class name, which would not work in my case since my model class name is User and not PublicUserNode, or an AriadneMeta property which is undocumented.

My problem was solved by injecting AriadneMeta property into my model instance inside the federation object type's resolve_reference method, but I had to go through the source code to figure out what was missing.

I'd like to suggest to add it to the documentation and create a way to declare the type to be resolved, specially if you have multiple types to represent the same data class.

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.