-
I'm experienced with JS but Gatsby is new to me, and this is also my first foray into GraphQL... I initially built an "SPA" site in React, which (The site documents each concert played by a particular band; it uses the CSV data to generate pages for each concert date, each venue, and each song. Here is the live site: https://almost-dead.net ) Lately I have been trying to convert it to use GraphQL, because with the current setup, it takes a long time to update the data and then publish. However I have run into issues between creating pages in Repo & branch: https://github.com/alxndr/almost-dead-net/tree/spike/graphql I'm attempting to define a URL structure like this:
I have React components in When I run
When using
(and then launches the local server) Then in the browser, the Home page shows this error:
...if I dismiss the error popup, the Home page works fine (with its child components using Static Queries) as does the What's the proper way to define a page with an ID in the URL, which extracts other data related to that ID via GraphQL? Thanks! —Alexander |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Aha, my issue appears to be that I was not ending my multiple uses of
After I added a semicolon to separate the back-to-back uses of |
Beta Was this translation helpful? Give feedback.
Aha, my issue appears to be that I was not ending my multiple uses of
createPage
with a semicolon. Leaving out the semicolons confuses GraphQL (?) so that it would complain about the use of{filter: {FIELD: {eq: VALUE}}}
, e.g.: