Git Product home page Git Product logo

Comments (6)

senjufy avatar senjufy commented on July 2, 2024 2

I did use resolve but wanted to stick with resolveFieldByKey just for the sake of continuation of the tutorial

from lireddit.

senjufy avatar senjufy commented on July 2, 2024 1

Hey Ctrl + click on resolveFieldByKey and it will take you to types.d.ts. In this types file on line 70 is the resolveFieldByKey type and above it there is a @deprected sign just remove it. And if you data doesn't still load wait till the next section where he fixes the mock data and iy will work after it. Hope this helps.

from lireddit.

aseerkt avatar aseerkt commented on July 2, 2024 1

@senjufy Thanks for the suggestion. You don't need to go as far as removing the @deprecated sign in types.d.ts file. As you can see from the above screenshot, just use resolve instead of resolveFieldByKey.

from lireddit.

bugenzi avatar bugenzi commented on July 2, 2024 1

I did use resolve but wanted to stick with resolveFieldByKey just for the sake of continuation of the tutorial

The crust of it stays the same, and sometimes it is better to do it a bit differently.
You can see the source code of urlq cache.resolveFieldByKey has slapped on the resolve method.

from lireddit.

aseerkt avatar aseerkt commented on July 2, 2024

Reopening for visibility to newcomers.

from lireddit.

aronweston avatar aronweston commented on July 2, 2024

This worked for me for anyone that wants to copy/pasta

fieldInfos.forEach((fi) => {
      const key = cache.resolve(entityKey, fi.fieldKey) as string; 
      const data = cache.resolve(key, 'posts') as string[];
      const _hasMore = cache.resolve(key, 'hasMore');
      if (!_hasMore) hasMore = _hasMore as boolean;
      results.push(...data);
    });```

from lireddit.

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.