FQL + NextJS serializing JSON errors
dsbrianwebster opened this issue Β· comments
@pbteja1998 great work on this starter! There are many examples out there with GraphQL and Fauna, but there is so much more one can do with FQL directly, so it is great to see some examples with NextJS and FQL
It may be slightly outside the goals of a starter, but I'm very curious to see some examples of working with React Query + FQL + getStaticProps
. I really run into a lot of pain points at this step in the process because fauna document expressions like Ref and Time get me into Error serializing .dehydratedState.queries hell. It is frustrating to have to reformat the fauna response just I can pass it through as props. Would love to see how you proceed here, perhaps some basic examples added to the readme?
@dsbrianwebster Thanks!
May be not in the repo, but I will publish a blog post related to this soon. Will link that blog post here after I publish it.
If you want, you can also take a look at the repo of https://coderplex.org which is developed by me.
Specifically take a look at the following file.
https://github.com/coderplex-org/coderplex-org/blob/beta/src/utils/fauna.ts
You can get some ideas of how I handled those cases there. I have since then discovered some easier ways to handle these cases. Will add all of these in the blog post soon.
Thanks @pbteja1998! Will have a look and will keep an eye out for that forthcoming blog post.