alloy / graphqless-js

Statically compiled resolvers for entire queries based on a graphql-js schema.
MIT License
7 stars 0 forks source link

AST access by resolvers #1

Open alloy opened 3 years ago

alloy commented 3 years ago

Some field resolvers need the AST in order to execute. Always inlining all the AST for each field will presumably get expensive in terms of bundle size n(needs verification). Possible solutions:

freiksenet commented 3 years ago

I see two possible approaches to this. One is handling AST as an async chunk that is either loaded manually by the user or automatically when info is used. Another is to limit what you can have in info object - possibly we can say that you can't directly access AST (or schema) when using this framework.