{"action":"created","issue":{"url":"https://api.github.com/repos/CargoSense/absinthe/issues/51","repository_url":"https://api.github.com/repos/CargoSense/absinthe","labels_url":"https://api.github.com/repos/CargoSense/absinthe/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/CargoSense/absinthe/issues/51/comments","events_url":"https://api.github.com/repos/CargoSense/absinthe/issues/51/events","html_url":"https://github.com/CargoSense/absinthe/issues/51","id":129867707,"number":51,"title":"Optimizations","user":{"login":"benwilson512","id":247817,"avatar_url":"https://avatars.githubusercontent.com/u/247817?v=3","gravatar_id":"","url":"https://api.github.com/users/benwilson512","html_url":"https://github.com/benwilson512","followers_url":"https://api.github.com/users/benwilson512/followers","following_url":"https://api.github.com/users/benwilson512/following{/other_user}","gists_url":"https://api.github.com/users/benwilson512/gists{/gist_id}","starred_url":"https://api.github.com/users/benwilson512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwilson512/subscriptions","organizations_url":"https://api.github.com/users/benwilson512/orgs","repos_url":"https://api.github.com/users/benwilson512/repos","events_url":"https://api.github.com/users/benwilson512/events{/privacy}","received_events_url":"https://api.github.com/users/benwilson512/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CargoSense/absinthe/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-29T19:58:03Z","updated_at":"2016-02-28T20:20:43Z","closed_at":"2016-02-28T20:20:43Z","body":"We should bake the post processing that's done on a schema into the schema module itself more, so that calling `.schema` is not such an expensive process.\r\n\r\nGeneral ideas include:\r\n\r\nFor type maps\r\n```\r\ndef __query_type_by_name__(\"User\"), do: MyTypeModule.user\r\ndef __query_type_by_identifier__(:user), do: MyTypeModule.user\r\n```\r\n\r\nUsing on_definition hooks to introspect on the AST of types / queries / mutations as they're created to do the transformations then, and inject them into other functions.\r\n\r\nThings that won't work: Unquoting the `.schema` as it currently looks somewhere. Anonymous functions can't be escaped, so they can't be unquoted into anything."},"comment":{"url":"https://api.github.com/repos/CargoSense/absinthe/issues/comments/189939894","html_url":"https://github.com/CargoSense/absinthe/issues/51#issuecomment-189939894","issue_url":"https://api.github.com/repos/CargoSense/absinthe/issues/51","id":189939894,"user":{"login":"bruce","id":72,"avatar_url":"https://avatars.githubusercontent.com/u/72?v=3","gravatar_id":"","url":"https://api.github.com/users/bruce","html_url":"https://github.com/bruce","followers_url":"https://api.github.com/users/bruce/followers","following_url":"https://api.github.com/users/bruce/following{/other_user}","gists_url":"https://api.github.com/users/bruce/gists{/gist_id}","starred_url":"https://api.github.com/users/bruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruce/subscriptions","organizations_url":"https://api.github.com/users/bruce/orgs","repos_url":"https://api.github.com/users/bruce/repos","events_url":"https://api.github.com/users/bruce/events{/privacy}","received_events_url":"https://api.github.com/users/bruce/received_events","type":"User","site_admin":false},"created_at":"2016-02-28T20:20:43Z","updated_at":"2016-02-28T20:20:43Z","body":"Handled in #53 "}}