#Polymorphic custom util functions?

14 messages · Page 1 of 1 (latest)

lunar runeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

      🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in <id:customize>

      ✅ You can mark a message as the answer for your post with `Right click -> Apps -> Mark Solution`
      (if you don't see the option, try refreshing Discord with Ctrl + R)
raw glade
#

Issue with fetch and custom util functions?

#

Issue with fetch and custom util functions next 13?

shell lake
#

hmm try moving the functions to different files; so server component util functions are not in the same file as the client component util functions

raw glade
#

However this might be an issue

#

I put the util function in there, and it is calculated dynamically on every request.

#

However, that means I would have to use both "util functions" - but then surely that wouldn't work as they'd both be imported into the client.ts file (for the graphql-request client) but one would be a client thing and one would be a server thing?

#

Could I possibly use dynamic imports? Or would that be a little bad performance wise/for any other reason?

shell lake
#

i don't use graphql so i don't know about this

raw glade
raw glade
#

Polymorphic custom util functions?

raw glade