{"action":"created","issue":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/173","labels_url":"https://api.github.com/repos/graphql/graphql-js/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/graphql/graphql-js/issues/173/comments","events_url":"https://api.github.com/repos/graphql/graphql-js/issues/173/events","html_url":"https://github.com/graphql/graphql-js/issues/173","id":106125034,"number":173,"title":"Schema, handling many-to-many queries","user":{"login":"AJ1310","id":6439584,"avatar_url":"https://avatars.githubusercontent.com/u/6439584?v=3","gravatar_id":"","url":"https://api.github.com/users/AJ1310","html_url":"https://github.com/AJ1310","followers_url":"https://api.github.com/users/AJ1310/followers","following_url":"https://api.github.com/users/AJ1310/following{/other_user}","gists_url":"https://api.github.com/users/AJ1310/gists{/gist_id}","starred_url":"https://api.github.com/users/AJ1310/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AJ1310/subscriptions","organizations_url":"https://api.github.com/users/AJ1310/orgs","repos_url":"https://api.github.com/users/AJ1310/repos","events_url":"https://api.github.com/users/AJ1310/events{/privacy}","received_events_url":"https://api.github.com/users/AJ1310/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-12T03:18:22Z","updated_at":"2015-09-14T09:28:48Z","closed_at":null,"body":"I have a problem with this specific scenario, and have not found much documentation. How in JS can i make a schema that allows me to query many to many ObjectTypes?"},"comment":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/comments/140015769","html_url":"https://github.com/graphql/graphql-js/issues/173#issuecomment-140015769","issue_url":"https://api.github.com/repos/graphql/graphql-js/issues/173","id":140015769,"user":{"login":"freiksenet","id":172936,"avatar_url":"https://avatars.githubusercontent.com/u/172936?v=3","gravatar_id":"","url":"https://api.github.com/users/freiksenet","html_url":"https://github.com/freiksenet","followers_url":"https://api.github.com/users/freiksenet/followers","following_url":"https://api.github.com/users/freiksenet/following{/other_user}","gists_url":"https://api.github.com/users/freiksenet/gists{/gist_id}","starred_url":"https://api.github.com/users/freiksenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freiksenet/subscriptions","organizations_url":"https://api.github.com/users/freiksenet/orgs","repos_url":"https://api.github.com/users/freiksenet/repos","events_url":"https://api.github.com/users/freiksenet/events{/privacy}","received_events_url":"https://api.github.com/users/freiksenet/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T09:28:48Z","updated_at":"2015-09-14T09:28:48Z","body":"You can define a `GraphQLList` on both sides.\r\n\r\n```js\r\nconst User = new GraphQLObjectType({\r\n   name: 'User', \r\n   fields: () => ({\r\n     groups: {\r\n       type: new GraphQLList(Group)\r\n     }\r\n  })\r\n});\r\n\r\nconst Group = new GraphQLObjectType({\r\n   name: 'Group', \r\n   fields: () => ({\r\n     users: {\r\n       type: new GraphQLList(User)\r\n     }\r\n  })\r\n});\r\n```\r\n\r\nHow the `resolve` function would work is totally up to how you store your data."}}