Giter VIP home page Giter VIP logo

Comments (6)

moufmouf avatar moufmouf commented on July 28, 2024 3

@XPOL555 I cannot really give you an estimate for v4 release but it is definitely soon (probably in November).
You can start using the 4.x-dev version. There will not be any breaking changes before 4.0 is released.

I only plan to fix #103, implement this feature and add a way to add a GraphQL field directly on a magic property (that could be useful to ease the integration with Eloquent)

from graphqlite.

gulien avatar gulien commented on July 28, 2024 1

@XPOL555 don’t hesitate to use the « dev-master » version: it is really stable ;)

from graphqlite.

fezfez avatar fezfez commented on July 28, 2024

I think its a bad idea, its adding complexity for nothing, instead use DI.

class MyQuery
{
    private $session;
    public function __construct(Session $session)
    {
        $this->session = $session;
    }

    /** @Query */
    public function getUser(): string
    {
       return $this->session->getUser()->getName();
    }
}

If you go this way, the graphqlite is going to turn into DIC, i think it's not design in this way.

from graphqlite.

XPOL555 avatar XPOL555 commented on July 28, 2024

Hi @moufmouf, is this the last issue needed for v4? I'm really interested in this project since i want to bundle into my laravel 6 application. Is there any estimate on when the v4 will be available?

Thank you for your amazing work!

from graphqlite.

XPOL555 avatar XPOL555 commented on July 28, 2024

@moufmouf @gulien great! Thank you guys!

from graphqlite.

moufmouf avatar moufmouf commented on July 28, 2024

@fezfez I still gave this a try (see #202).

I understand that you can clearly inject the "session" in your constructor and fetch the current user this way, but this is framework specific. And GraphQLite is framework agnostic.

I envision the possibility to create third party packages that would contain queries / mutations that could be used in any framework. Adding this InjectUser annotation allows me to access the current user, whatever the framework I'm using.

from graphqlite.

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.