fbsamples / f8app

Source code of the official F8 app of 2017, powered by React Native and other Facebook open source projects.
http://makeitopen.com
Other
13.99k stars 2.52k forks source link

RelayModernGraphQLTag: Expected an request #221

Open fenglu09 opened 6 years ago

fenglu09 commented 6 years ago

Run this project local. With the error below

ExceptionsManager.js:63 RelayModernGraphQLTag: Expected an request, 
got `{"fragment":{"argumentDefinitions":[],"kind":"Fragment","metadata":null,"name":"F8DemosViewQuery","selections":
[{"kind":"LinkedField","alias":null,"args":null,"concreteType":"Demo","name":"demos","plural":true,
"selections":[{"kind":"ScalarField","alias":null,"args":null,"name":"title","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"description","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"booking","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"location","storageKey":null},
{"kind":"LinkedField","alias":null,"args":null,"concreteType":"DemoLink","name":"links","plural":true,
"selections":[{"kind":"ScalarField","alias":null,"args":null,"name":"title","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"url","storageKey":null}],"storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"logo","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"logoHeight","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"logoWidth","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"devGarage","storageKey":null}],"storageKey":null}]
,"type":"Query"},"id":null,"kind":"Batch","metadata":{},"name":"F8DemosViewQuery","query":
{"argumentDefinitions":[],"kind":"Root","name":"F8DemosViewQuery","operation":"query",
"selections":[{"kind":"LinkedField","alias":null,"args":null,"concreteType":"Demo","name":"demos","plural":true,
"selections":[{"kind":"ScalarField","alias":null,"args":null,"name":"title","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"description","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"booking","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"location","storageKey":null},
{"kind":"LinkedField","alias":null,"args":null,"concreteType":"DemoLink","name":"links","plural":true,
"selections":[{"kind":"ScalarField","alias":null,"args":null,"name":"title","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"url","storageKey":null}],"storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"logo","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"logoHeight","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"logoWidth","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"devGarage","storageKey":null},
{"kind":"ScalarField","alias":null,"args":null,"name":"id","storageKey":null}],"storageKey":null}]},
"text":"query F8DemosViewQuery {\n  demos {\n    title\n    description\n    booking\n    location\n   
 links {\n      title\n      url\n    }\n    logo\n    logoHeight\n    logoWidth\n    devGarage\n    id\n  }\n}\n"}`.

image

hrdzkj commented 6 years ago

i have the same issue

wholwh commented 6 years ago

i meet this problem in android.

ly-sun commented 6 years ago

I have the same problem.How should i handle?

PandaGeek1024 commented 6 years ago

Got the same issue, no one has a fix?

bogdan0083 commented 6 years ago

I've found a way to fix this:

  1. Upgrade graphql package to 0.13.2 (or newer version)
  2. (not sure if this needed) run yarn graphql or npm run graphql
  3. re-compile graphql files (run yarn relay or npm run relay)