Giter VIP home page Giter VIP logo

Comments (5)

logaretm avatar logaretm commented on May 16, 2024 2

Don't think that's a villus issue. For the first one, I was avoiding this for a while but looks like a major upgrade is in order. The signatures need to be updated so it doesn't confuse the DocumentNode with QueryComposableOptions.

Basically all useQuery, useMutation and useSubscription signatures will follow this scheme:

  1. first argument is always query
  2. second argument is always variables
  3. third argument is always options where applicable

That or just always an object, no second arguments. This will make the API more scalable

Will tag this as rc.0 once done

from villus.

logaretm avatar logaretm commented on May 16, 2024

I see that it's confusing the two signatures, this is an issue not related to the TypedDocument. Will see what I can do.

from villus.

kingkong404 avatar kingkong404 commented on May 16, 2024

Thanks! There also seems to be a weird bug with autocomplete removing the dot after an option has been selected.

image

image

from villus.

logaretm avatar logaretm commented on May 16, 2024

Closed in rc.0, documentation was updated to reflect the chosen signature which is:

useQuery({
  query: Posts,
  variables: {},
  // other options
});

useMutation(CreatePost);

useSubscription({
  query: ChatMessages,
  variables: {}
}, reducer);

from villus.

kingkong404 avatar kingkong404 commented on May 16, 2024

@logaretm Looks to be working great. Thanks a lot, much appreciated.

from villus.

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.