{"action":"created","issue":{"url":"https://api.github.com/repos/nuwave/lighthouse/issues/400","repository_url":"https://api.github.com/repos/nuwave/lighthouse","labels_url":"https://api.github.com/repos/nuwave/lighthouse/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/nuwave/lighthouse/issues/400/comments","events_url":"https://api.github.com/repos/nuwave/lighthouse/issues/400/events","html_url":"https://github.com/nuwave/lighthouse/issues/400","id":371531767,"node_id":"MDU6SXNzdWUzNzE1MzE3Njc=","number":400,"title":"Lazy-load types from the serialized AST","user":{"login":"spawnia","id":12158000,"node_id":"MDQ6VXNlcjEyMTU4MDAw","avatar_url":"https://avatars2.githubusercontent.com/u/12158000?v=4","gravatar_id":"","url":"https://api.github.com/users/spawnia","html_url":"https://github.com/spawnia","followers_url":"https://api.github.com/users/spawnia/followers","following_url":"https://api.github.com/users/spawnia/following{/other_user}","gists_url":"https://api.github.com/users/spawnia/gists{/gist_id}","starred_url":"https://api.github.com/users/spawnia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spawnia/subscriptions","organizations_url":"https://api.github.com/users/spawnia/orgs","repos_url":"https://api.github.com/users/spawnia/repos","events_url":"https://api.github.com/users/spawnia/events{/privacy}","received_events_url":"https://api.github.com/users/spawnia/received_events","type":"User","site_admin":false},"labels":[{"id":384418445,"node_id":"MDU6TGFiZWwzODQ0MTg0NDU=","url":"https://api.github.com/repos/nuwave/lighthouse/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-18T13:30:54Z","updated_at":"2018-12-05T04:39:49Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Is your feature request related to a problem? Please describe.**\r\n\r\nWhile the caching of the AST does provide pretty good performance, there are issues when\r\ndealing with really large schemas.\r\n\r\n**Describe the solution you'd like**\r\n\r\nThe basic idea is summed up pretty nicely [in this comment](https://github.com/webonyx/graphql-php/issues/229#issuecomment-359704382).\r\n\r\nWe have to parse the whole schema initially to do schema manipulation, such as adding additional types for `@paginate`, and merging type extensions. Once we have our final schema AST, we can split it up.\r\n\r\n**Challenges**\r\n\r\nWe have to solve the issue of orphaned types for Introspection, see [the discussion here](https://github.com/webonyx/graphql-php/issues/355#issuecomment-423576537)"},"comment":{"url":"https://api.github.com/repos/nuwave/lighthouse/issues/comments/444356362","html_url":"https://github.com/nuwave/lighthouse/issues/400#issuecomment-444356362","issue_url":"https://api.github.com/repos/nuwave/lighthouse/issues/400","id":444356362,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDM1NjM2Mg==","user":{"login":"yaquawa","id":13927101,"node_id":"MDQ6VXNlcjEzOTI3MTAx","avatar_url":"https://avatars3.githubusercontent.com/u/13927101?v=4","gravatar_id":"","url":"https://api.github.com/users/yaquawa","html_url":"https://github.com/yaquawa","followers_url":"https://api.github.com/users/yaquawa/followers","following_url":"https://api.github.com/users/yaquawa/following{/other_user}","gists_url":"https://api.github.com/users/yaquawa/gists{/gist_id}","starred_url":"https://api.github.com/users/yaquawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaquawa/subscriptions","organizations_url":"https://api.github.com/users/yaquawa/orgs","repos_url":"https://api.github.com/users/yaquawa/repos","events_url":"https://api.github.com/users/yaquawa/events{/privacy}","received_events_url":"https://api.github.com/users/yaquawa/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T04:39:49Z","updated_at":"2018-12-05T04:39:49Z","author_association":"CONTRIBUTOR","body":"@spawnia here is my rough idea to optimize the performance.\r\n\r\n1. Keep a complete schema AST in the cache.\r\n2. Analyze the incoming request, figure out the minimum required AST by comparing to the complete AST.\r\n3. Convert AST to ObjectType objects.\r\n4. Cache the ObjectType objects with a hash key calculated from the incoming request.\r\n\r\n**Second round:**\r\n1. Check if there is any cache against the incoming request.\r\n2. If yes, load the ObjectType objects from cache. If not perform the “build” process.\r\n\r\nDo you think this is the proper approach to solve the problem?"}}
{"actor":{"display_login":"yaquawa"}}