Git Product home page Git Product logo

react-graphql-relay-example's People

Contributors

samerbuna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-graphql-relay-example's Issues

Invalid configuration object

$ npm run build

 [email protected] build /Users/upahw/Documents/Alpha-App/rgrjs
 webpack

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module has an unknown property 'loaders'. These properties are valid:
   object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp? }
   -> Options affecting the normal modules (`NormalModuleFactory`).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `webpack`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/$user/.npm/_logs/2020-06-18T12_21_08_413Z-debug.log

Error while typing a search keyword

At line 15 in /js/components/Main.js

search = (e) => {
  let query = e.target.value; // this is always 'null'
  this.props.relay.setVariables({ query });
};

I get the error message in browser console:

Uncaught TypeError: Cannot read property 'value' of null

and the search function does not work.
It seems debounce() from lodash causes error but not sure why.

Optimistic Updates not working

Optimistic Update for a resource is not working when you create a resource.
When you add a resource the following warning appears:

Warning: writeRelayUpdatePayload(): Expected response payload to include the newly created edge 
`linkEdge` and its `node` field. Did you forget to update the `RANGE_ADD` mutation config?

The optimistic updates work when your remove the custom param query: $query from the GraphQL query parameters for the Link Mutation.

Basically the implementation of the search query breaks the code for the optimistic updates for resources

some issues

Dear Samer Buna,
Thank you for your great work, I have some issues

1.I tried to add new row, the record inserted successfully but show me this message:

bundle.js:21736 Warning: writeRelayUpdatePayload(): Expected response payload to include the newly created edge linkEdge and its node field. Did you forget to update the RANGE_ADD mutation config?

2.why with every time when we added a new record the output return the store with linkConnection in api, is that good for performance?

Is there anyway to add records without return the full list again?

3.When you select show 100 and select show 200 nothing nothing happened

Failed to compile

Hi everyone

I get this error when Im typing heroku open on terminal.

Failed to compile

./src/index.js
Module build failed: ReferenceError: Unknown plugin "react-relay" specified in "/app/package.json" at 0, attempted to resolve relative to "/app"
at Array.map ()

This error occurred during the build time and cannot be dismissed.

Does anyone know how to resolve this?

/S

Confusing License Specified in Repository

There is no clear license specified in this repository (neither a LICENSE.md file, nor a License section in the README.md file). However, in the package.json file, the "license" field is set to "ISC". But at the same time, there is no actual ISC license text anywhere in the repository. Even the "author" field in the package.json file is set to an empty string. There may be certain legal issues with the license defined in such an ambiguous way, both for the author (@samerbuna) and for anyone who wants to use any part of this code.

If you don't include any license, U.S. copyright law states that the most restrictive copyright terms apply (meaning "All Rights Reserved"), which means that no one can legally reuse, share, and/or modify any part of this code. The fact that the "ISC" license is specified in package.json, but there is no ISC license text anywhere creates a very confusing and ambiguous situation as to whether or not the ISC license applies.

Can you please properly, clearly, and consistently define what type of license you want this code to be released under within this repository (preferably as a LICENSE.md file)? Thanks.

@samerbuna

SyntaxError: Cannot use import statement outside a module

yarn run v1.21.0
$ webpack
Hash: 396f0bfb9d565b6f60f0
Version: webpack 1.15.0
Time: 571ms
    + 1 hidden modules

ERROR in ./js/app.js
Module build failed: /home/wuilt/rgrjs/data/schema.js:1
import {
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1063:16)
    at Module._compile (internal/modules/cjs/loader.js:1111:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/wuilt/rgrjs/babelRelayPlugin.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:178:20
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/home/wuilt/rgrjs/node_modules/babel-loader/lib/index.js:46:20)
    at Object.module.exports (/home/wuilt/rgrjs/node_modules/babel-loader/lib/index.js:163:20)
Done in 0.97s.

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.