-
Notifications
You must be signed in to change notification settings - Fork 529
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
SDL Support #503
SDL Support #503
Conversation
Unfortunately, the current implementation has the compilation time issue we ran into with early versions of Absinthe. The experimental implementation does lots of the following, for every object and field
For ~200 line schemas it takes ~2 seconds to compile. Not great, but workable. The problem is it's non linear. A schema twice the size at ~400 lines takes 12 seconds to compile. 700 lines takes 26 seconds, and 1000 lines takes 45 seconds. Basically, we can't do stuff in the module body. This may be OK though, since we're doing things differently this time. If we ignore the problem of anonymous functions for a second (I've got an idea for those) I think we can simply push values into an ets table. Then we do a single EDIT: 1000 line file reduced to 0.5 seconds. Got an approach that works. |
* Convert integration tests to standard * Fix parser error line/column reporting * Don't discard line/col info in some tokens * Fix operation type line/col * Fix remaining integration tests
This reverts commit dd01c7a.
* Add modify/1 hook, move pipeline, tweak tests * formatting and use type references properly * green simple test * Support schema decoration * Use decorations/2 * Add :resolve decoration * Fix test name * Add schema compilation error checking to pipeline * Move SourceLocation from Blueprint.Document to Blueprint * Remove unused module attribute * Add :source_location to Blueprint.Schema structs, support in Draft * Split Type.built_in_module?/1 We're already Module.split/1'ing, so we can use Module.concat/1 vs Module.safe_concat/1. * Add module tracking to InputValueDefinition * Set identifier for InputValueDefinition * InputValueDefinition -> Type.Argument w/ desc * Track modules for enum values * Fix test breakage due to code fix * Use stuttering pre-walk, test describing args * Remove module attribute debris * formatting * middleware renaming * green tests * use middleware_ref consistently * don't do it for nil refs * add back in the struct attrs for functions * move the functions back into the types * unify middleware expansion * handle functions more generically, and inline them when possible * break out building the types from compiling them * improved function inlining * remove warning
The only remaining functionality item at this point I think is
Then of course there's all the validation rules we need to recreate, and the error system. |
OK. I'm gonna merge this in at this point, everything is fully functional. The error system still needs to happen, but I'll handle that in another PR. The next major task is actually over in Absinthe.Relay to make sure that we can get it to work with all of these changes. |
closes #222 |
This branch is wildly experimental right now, do not try to use.