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
I found that graphql-js.org docs have old syntax (e.g. var, require whereas at least Enabling Stream & Defer section uses the modern syntax (const, import) Getting Started page also says that the old syntax is used in the examples.
So wanted to ask:
Can old syntax be replaced with modern one?
Are there any important reasons why docs still have the old syntax?
Is it there so that a user can run the code without doing things like .mjs file extension & setting type: module in package.json to have imports or anything like that?
Looking forward to hearing back from you, thanks! 👍
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey everyone 👋
I found that graphql-js.org docs have old syntax (e.g.
var
,require
whereas at least Enabling Stream & Defer section uses the modern syntax (const
,import
)Getting Started page also says that the old syntax is used in the examples.
So wanted to ask:
.mjs
file extension & settingtype: module
inpackage.json
to have imports or anything like that?Looking forward to hearing back from you, thanks! 👍
Beta Was this translation helpful? Give feedback.
All reactions