GithubHelp home page GithubHelp logo

Comments (7)

ilomon10 avatar ilomon10 commented on June 15, 2024 1

Hello @BatuhanW
I'm running the project only in local, so all the database and server on local, so why i cant see my own data without internet?

My server is installed on Localhost, my database in localhost, everything in local only there is no effected with outside world

from refine.

aliemir avatar aliemir commented on June 15, 2024 1

Hey @ilomon10, looks like this is an issue with the @tanstack/query's network mode. You can set it to always or offlineFirst to make it send the requests regardless of the network state.

  • Check out the Network Mode docs from the @tanstack/query here
  • Check out the <Refine /> component config to update it globally here

from refine.

BatuhanW avatar BatuhanW commented on June 15, 2024

Hello @ilomon10 how do you expect to login without an internet connection? Can't really see the problem here, as it's expected you can't login or see any data without internet.

from refine.

BatuhanW avatar BatuhanW commented on June 15, 2024

Hey @ilomon10 sorry for the misunderstanding, re-opening the issue, we'll investigate it.

from refine.

ilomon10 avatar ilomon10 commented on June 15, 2024

Thankyou @BatuhanW for reopen the issue 🙇🏻‍♂️

Thankyou @aliemir now by setting by this, the request now is started without connection. 🎉

<Refine
  // ...
  options: {
    // ...
    reactQuery: {
      clientConfig: {
        defaultOptions: {
          mutations: {
            networkMode: "offlineFirst" // or replace with "always" to make the request run normally, without connection.
          },
        },
      },
    },
  }
/>

from refine.

BatuhanW avatar BatuhanW commented on June 15, 2024

Hello @ilomon10 would you like to make a contribution by adding this question/answer to our FAQ documentation?

https://github.com/refinedev/refine/blob/master/documentation/docs/guides-concepts/faq/index.md

from refine.

ilomon10 avatar ilomon10 commented on June 15, 2024

Sure @BatuhanW Im so excited to contribute.

But im still have type error, when i implement this options
Type error: Type 'string' is not assignable to type 'NetworkMode | undefined'.

options={{
  reactQuery: {
    clientConfig: {
      defaultOptions: {
        queries: {
          networkMode: "always", // Type error here
        },
        mutations: {
          networkMode: "always",  // and here
        },
      },
    },
  },
}}

from refine.

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.