You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great tutorial, it was very helpful in learning GraphQL. I actually started the React tutorial first, then decided to come and do this one, as the React one uses this same backend. I thought it would be a much better learning experience to build the backend tutorial first, then use that backend code to build the frontend tutorial. However, I hit a stumbling block immediately upon trying to use my backend code:
In this tutorial, the Link { createdAt } field is only used in the Prisma schema, not in the main API schema. If you download the server starter code listed in the React tutorial, it is is correctly listed in both schemas.
Further, the createdAt type is DateTime, which doesn't seem to be a standard GraphQL type. Using it requires that you declare "scalar DateTime" at the top of your API schema (as seen in the React tut starter). Doing that worked for me with no additional dependencies, but I have no idea why.
Some more clarity on that within the tutorial would be helpful.
The text was updated successfully, but these errors were encountered:
I'll second this. In the backend tutorial for Node, "type Link" in the schema.graphql file is missing the "createdAt:" field, which results in an error when trying to go through the first steps for the front-end tutorial for React+Apollo. I was able to fix the problem by adding that field as follows:
createdAt: String!
This should be added as a step after adding the "createdAt" field in the datamodel, as is done in the other steps (modifying the schema in addition to modifying the datamodel) in order to keep all aspects of the schema in agreement with the datamodel.
Hey,
Thanks for the great tutorial, it was very helpful in learning GraphQL. I actually started the React tutorial first, then decided to come and do this one, as the React one uses this same backend. I thought it would be a much better learning experience to build the backend tutorial first, then use that backend code to build the frontend tutorial. However, I hit a stumbling block immediately upon trying to use my backend code:
In this tutorial, the Link { createdAt } field is only used in the Prisma schema, not in the main API schema. If you download the server starter code listed in the React tutorial, it is is correctly listed in both schemas.
Further, the createdAt type is DateTime, which doesn't seem to be a standard GraphQL type. Using it requires that you declare "scalar DateTime" at the top of your API schema (as seen in the React tut starter). Doing that worked for me with no additional dependencies, but I have no idea why.
Some more clarity on that within the tutorial would be helpful.
The text was updated successfully, but these errors were encountered: