{"action":"created","issue":{"url":"https://api.github.com/repos/haskell-graphql/graphql-api/issues/183","repository_url":"https://api.github.com/repos/haskell-graphql/graphql-api","labels_url":"https://api.github.com/repos/haskell-graphql/graphql-api/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/haskell-graphql/graphql-api/issues/183/comments","events_url":"https://api.github.com/repos/haskell-graphql/graphql-api/issues/183/events","html_url":"https://github.com/haskell-graphql/graphql-api/issues/183","id":327056343,"number":183,"title":"improving the AST doc","user":{"login":"theobat","id":8222999,"avatar_url":"https://avatars2.githubusercontent.com/u/8222999?v=4","gravatar_id":"","url":"https://api.github.com/users/theobat","html_url":"https://github.com/theobat","followers_url":"https://api.github.com/users/theobat/followers","following_url":"https://api.github.com/users/theobat/following{/other_user}","gists_url":"https://api.github.com/users/theobat/gists{/gist_id}","starred_url":"https://api.github.com/users/theobat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theobat/subscriptions","organizations_url":"https://api.github.com/users/theobat/orgs","repos_url":"https://api.github.com/users/theobat/repos","events_url":"https://api.github.com/users/theobat/events{/privacy}","received_events_url":"https://api.github.com/users/theobat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-28T15:09:03Z","updated_at":"2018-05-29T06:55:36Z","closed_at":null,"author_association":"NONE","body":"I think a good way to improve the doc would be to provide examples at each level of the AST types with graphql doc snippets such as what I naively did in #145. \r\nSomething like: \r\n\r\n```graphql\r\n#VariableDefinition -> a variable defined in a GraphQL query/mutation context like\r\nmyQuery($myVariable: MyVariableType)\r\n# Field -> a Field takes place in a SelectionSet such as \r\nmyParentField { myField1 myField2 } \r\n#Argument -> an argument is defined in front of a GraphQL Field such as \r\n{ myField (myArgument: \"literalString\")}  or { myField (myArgument: $myVariable)}\r\n```\r\nI'm going to try to put together a PR for this.\r\n\r\nI think it would be easier for new comers to grasp what is going on in the query parsing (which is half of the job), and helps a lot when it comes to contributing"},"comment":{"url":"https://api.github.com/repos/haskell-graphql/graphql-api/issues/comments/392671727","html_url":"https://github.com/haskell-graphql/graphql-api/issues/183#issuecomment-392671727","issue_url":"https://api.github.com/repos/haskell-graphql/graphql-api/issues/183","id":392671727,"user":{"login":"theobat","id":8222999,"avatar_url":"https://avatars2.githubusercontent.com/u/8222999?v=4","gravatar_id":"","url":"https://api.github.com/users/theobat","html_url":"https://github.com/theobat","followers_url":"https://api.github.com/users/theobat/followers","following_url":"https://api.github.com/users/theobat/following{/other_user}","gists_url":"https://api.github.com/users/theobat/gists{/gist_id}","starred_url":"https://api.github.com/users/theobat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theobat/subscriptions","organizations_url":"https://api.github.com/users/theobat/orgs","repos_url":"https://api.github.com/users/theobat/repos","events_url":"https://api.github.com/users/theobat/events{/privacy}","received_events_url":"https://api.github.com/users/theobat/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T06:55:36Z","updated_at":"2018-05-29T06:55:36Z","author_association":"NONE","body":"It seems some type/data definitions in [AST](https://github.com/haskell-graphql/graphql-api/blob/master/src/GraphQL/Internal/Syntax/AST.hs#L187-L230) and API (e.g. [here](https://github.com/haskell-graphql/graphql-api/blob/master/src/GraphQL/Internal/Schema.hs#L109-L116) and [here](https://github.com/haskell-graphql/graphql-api/blob/master/src/GraphQL/Internal/Schema.hs#L139) ), are very close.\r\nSide by side example : \r\n```\r\n-- Schema\r\ndata ObjectTypeDefinition = ObjectTypeDefinition Name Interfaces (NonEmpty FieldDefinition)\r\nderiving (Eq, Ord, Show)\r\n-- AST\r\ndata ObjectTypeDefinition = ObjectTypeDefinition Name Interfaces [FieldDefinition]\r\nderiving (Eq,Show)\r\n``` \r\n\r\nFurthermore, I didn't find any occurence of the various TypeDefinition from the AST module. Besides, I don't see why anything defined in the user's schema would end up in the AST, because making the schema does not require any real \"parsing\" (in the sense of Text -> AST.Something)\r\nDid I miss something or is it just old code ?\r\n\r\n"}}
{"actor":{"display_login":"theobat"}}