relayjs / relay-examples

A collection of sample Relay applications
MIT License
1.14k stars 433 forks source link

error nextjs relay-examples project #234

Closed mojtabajahannia closed 2 years ago

mojtabajahannia commented 2 years ago

hello i'm clone relay-examples and when using the next project viewed this error

my works:

git clone repo
cd data-driven-dependencies/
yarn
yarn dev

error:

[0] Module not found: Can't resolve '/home/mojtaba/w/relay-examples/data-driven-dependencies/./__generated__/BlogPost_post.graphql.js'
[0]   3 | 
[0]   4 | const BlogPost = ({post}) => {
[0] > 5 |   const data = useFragment(
[0]     |                          ^
[0]   6 |     graphql`
[0]   7 |       fragment BlogPost_post on BlogPost {
[0]   8 |         id
[0] 
sibelius commented 2 years ago

run the compiler

yarn relay

mojtabajahannia commented 2 years ago

Thank you.

Can you help me for use external backend? I only have one schema file from the backend. And I could not configure it correctly.

daniloab commented 2 years ago

try to follow this example https://github.com/jantimon/next-relay-demo

just replace the URL to your backend

mojtabajahannia commented 2 years ago

it's working thank you so much.