:star2: 2056 | @heroiczero |http://www.freecodecamp.com/heroiczero
var colors = ['white', 'orange', 'blue'];
var color = colors[Math.floor(Math.random()*colors.length)];
console.log(color);
something like that and u dont need isColor variable
:cookie: 390 | @padunk |http://www.freecodecamp.com/padunk
:cookie: 391 | @padunk |http://www.freecodecamp.com/padunk
src
:cookie: 463 | @jtan3 |http://www.freecodecamp.com/jtan3
Hey folks, I get this error in my react application:
POST http://localhost:4000/graphql 500 (Internal Server Error)
HTTPFetchNetworkInterface.fetchFromRemoteEndpoint @ apollo.umd.js:520
(anonymous) @ apollo.umd.js:535
This is my networkInterface:
const networkInterface = createNetworkInterface({
uri: "http://localhost:4000/graphql",
opts: {
credentials: "same-origin",
mode: "no-cors" //remove this for production => Security!
}
});
Did I declare something wrong? Without the anti cors option, I get an cross-server-error.