Coder Social home page Coder Social logo

Comments (5)

JCFerrerG avatar JCFerrerG commented on May 1, 2024 1

I am also encountering this issue on the current master (a758655) on Window 7, npm v3.10.10, node v6.11.3, and Chromium 60.0.3112.78. The demo page seems to work well on the same browser.

Steps to reproduce

First, npm install run successfully with a few warnings. The attached npm-list.log is the output of npm list.

npm start outputs the following to the terminal:

Compiled with warnings.

Warning in ./src/apolloClient/index.js

C:\Users\drbago\Documents\Workspace\MyProject\admin-on-rest-graphql-demo\src\apolloClient\index.js
  50:54  warning  Expected '===' and instead saw '=='  eqeqeq
  67:68  warning  Expected '===' and instead saw '=='  eqeqeq

✖ 2 problems (0 errors, 2 warnings)


You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

In the browser, the page does not seem to load, and the DevTools shows errors as pictured:
image

Other, possibly related, issues

The build produced by npm run build exhibits the same error.

Also, on this commit, npm test fails with the following output:

 FAIL  src\App.test.js
  ● Test suite failed to run

    ReferenceError: data is not defined

      at Object.<anonymous> (src\apolloClient\index.js:11:21)
      at Object.<anonymous> (src\aorApolloClient.js:4:47)
      at Object.<anonymous> (src\App.js:4:50)
      at Object.<anonymous> (src\App.test.js:3:38)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        5.537s
Ran all test suites.

from admin-on-rest-graphql-demo.

djhi avatar djhi commented on May 1, 2024 1

It requires a version of admin-on-rest that has not been published

Not anymore, it works with the latest release.

Unfortunately, I'm currently on a customer project and I don't know when I will have time for this. Rest assured that the marmelab team will continue to work on it though

from admin-on-rest-graphql-demo.

JCFerrerG avatar JCFerrerG commented on May 1, 2024

Cause of the error

In general, this error seem to be caused in a few different ways by libraries that depend on GraphQL. In this case, it seems to be through aor-simple-graphql-client -> apollo-client -> graphql.

Here are some issue reports referencing this error, which seem to fall into different categories:

aor-graphql-simple-client has been deprecated in later versions. The successor, aor-graphql, is clearly labeled as a work in progress by the developer.

How is this bug introduced?

On a higher level, I would venture to guess that this issue is introduced by a combination of bugs that creep in through the inconsistent dependency resolution of package.json. The demo might work, if the exact versions of dependencies are provided.

On a side note, this is one of the benefits of the "deterministic", "super reliable" lockfile format used in yarn.

Moving forward?

Follow the new demo in aor-graphql.

from admin-on-rest-graphql-demo.

djhi avatar djhi commented on May 1, 2024

This demo will be deprecated soon. The aor-simple-graphql-client has already been deprecated too. All our current work on aor and gql is happening on aor-graphql, demo included

from admin-on-rest-graphql-demo.

JamesSingleton avatar JamesSingleton commented on May 1, 2024

Awesome! I will take a look later today. Thank you @djhi

from admin-on-rest-graphql-demo.

Related Issues (1)

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.