Closed RoryO closed 2 years ago
Bit of an update, dependabot never gave me a PR for 5.1.7, so I was using 5.1.2. Updating to 5.1.7 gets me further as there is now a $
function exported. I think I can infer what to do from here with the new $
function, even though it isn't documented. This is a pretty rough migration, I think I have a few hundred variables using the $ template tag.
@RoryO For what it's worth, there's a good example of useZeusVariables
here:
Thanks, I don't think that's entirely right either. Last I tried, the new $
function required two parameters, the name of the variable and the graphql type. The second seemed unnecessary work since whatever process assigns typescript variables to the gql variables already knows the gql type. We shouldn't have to specify it again. So I'm thinking we're not supposed to use the $
function anymore and it's probably internal. At any rate I'm using the last 4.x release until all of these bumps clear.
I was using Zeus completely fine pre 5.0. I usually wrote queries with variables as such
This used the
$
template function, which used to be in the generated schema defined asI have been using 5.1 for a while, and I never regenerated the schema yet, things still worked just as before. So I was using a generated schema from 4 with 5.1 without issue. Now, when I regenerate the schema with 5.1.2 using
npx zeus https://foo.us ./src --node
, the $ template tag is missing. The documentation about variables talks about theuseZeusVariables
and then doesn't use it in any of the examples. The example also uses a$
function likecard: $('card')
, but the example mutation doesn't have anything matching the symbol 'card', so I'm extra lost. Further, the example page hasimport { Gql, $ } from './zeus';
, however my generated schema file does not have any export named$
, so now I'm super omega lost. What's the intended thing to do here?