-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue on website code snippet #16
Comments
Ah.. while writing this issue I realised that This is maybe a bit confusing. |
Yep. Good point... that was the intention. At the same time, '...fields' is a 'Rest' operator and so at least the 'fields' object/var now contains the rest of the fields, i.e. all fields except 'name', 'ceo' and 'founded'. Maybe I'll come up with a better illustration, thanks for the heads-up! |
I thought in term of gqty.. But there is a major difference. You use callbacks for nested queries (I missed that). Qqty uses return objects which are then analysed via a Proxy. const {company} = await resolve(({Query}) => {
const company = Query.company(...args)
return {
name: company.name,
ceo: company.ceo,
founded: company.founded
}
}) Do you support args? |
You should really link the Playground on you website. |
Yes, you can use args everywhere and they are hoisted into the variables of the graphql operation. See #6 |
yea the playground website was my first try... the liontari.ai website is my try to look more 'professional' :D |
Hey @schettn , i went all-in on the playground. Would really appreciate your feedback :) check https://liontari.ai ... it works on mobile too, but it takes a while to load typescript and rollup things in the cache. |
Looks nice! But I dont get the snippet. what is Do yo have some documentation on how the syntax works? I personally find it quite hard to understand when just reading the code. |
Hmm, thanks for asking, the When using the The problem is that My idea would be, to introduce a placeholder variable like import sdk, { _ } from "sdk";
const { getCountry } = await sdk(op => op.query(({ country }) => ({
getCountry: country({ code: _ })(s => ({ // see the use of _ here
name: s.name({lang: "en"}),
capital: s.capital
})).$lazy
}))); this would have the type I have some docs on for the |
I just saw this on your website and haven't tested it but I think the
...fields
(autocompletion support) cannot work as fields isn't defined anywhere.The text was updated successfully, but these errors were encountered: