{"action":"created","issue":{"url":"https://api.github.com/repos/overblog/GraphQLBundle/issues/414","repository_url":"https://api.github.com/repos/overblog/GraphQLBundle","labels_url":"https://api.github.com/repos/overblog/GraphQLBundle/issues/414/labels{/name}","comments_url":"https://api.github.com/repos/overblog/GraphQLBundle/issues/414/comments","events_url":"https://api.github.com/repos/overblog/GraphQLBundle/issues/414/events","html_url":"https://github.com/overblog/GraphQLBundle/issues/414","id":376501576,"node_id":"MDU6SXNzdWUzNzY1MDE1NzY=","number":414,"title":"Pass additional data for type defined in schema.yml","user":{"login":"carere","id":1385328,"node_id":"MDQ6VXNlcjEzODUzMjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1385328?v=4","gravatar_id":"","url":"https://api.github.com/users/carere","html_url":"https://github.com/carere","followers_url":"https://api.github.com/users/carere/followers","following_url":"https://api.github.com/users/carere/following{/other_user}","gists_url":"https://api.github.com/users/carere/gists{/gist_id}","starred_url":"https://api.github.com/users/carere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carere/subscriptions","organizations_url":"https://api.github.com/users/carere/orgs","repos_url":"https://api.github.com/users/carere/repos","events_url":"https://api.github.com/users/carere/events{/privacy}","received_events_url":"https://api.github.com/users/carere/received_events","type":"User","site_admin":false},"labels":[{"id":326319283,"node_id":"MDU6TGFiZWwzMjYzMTkyODM=","url":"https://api.github.com/repos/overblog/GraphQLBundle/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-01T17:56:03Z","updated_at":"2018-11-12T15:41:19Z","closed_at":null,"author_association":"NONE","body":"| Q                | A\r\n| ---------------- | -----\r\n| Bug report?      | no\r\n| Feature request? | no\r\n| BC Break report? | no\r\n| RFC?             | no\r\n| Version/Branch   | 0.11\r\n\r\nHello :) Thx a lot for this amazing bundle.\r\n\r\nI have a question, i would like to add some additional info in my yaml schema:\r\n\r\nExemple:\r\n\r\n```\r\nRoleType:\r\n    type: object\r\n    custom_entry: // A custom entry in object scope ?\r\n    config:\r\n        fields:\r\n            id:\r\n                type: ID\r\n            users:\r\n                type: '[UserType]'\r\n                custom_entry: // A custom entry in field scope ? \r\n            role:\r\n                type: String\r\n            createdAt:\r\n                type: DateTime\r\n            updatedAt:\r\n                type: DateTime\r\n```\r\nSo is there any options which allow us to pass custom data ?\r\n\r\nI'll explain :) I would like to specify a field amongst the `config.fields` entry, which indicate that it has to be used in order to filter a relation; In my exemple, above, i would like to find a way to indicate that in my field `config.fields.users`, we have to use the field `username` of the `UserType` to filter the relation.\r\n\r\nIs that enough clear ?\r\n\r\nBest regards ;) "},"comment":{"url":"https://api.github.com/repos/overblog/GraphQLBundle/issues/comments/437926996","html_url":"https://github.com/overblog/GraphQLBundle/issues/414#issuecomment-437926996","issue_url":"https://api.github.com/repos/overblog/GraphQLBundle/issues/414","id":437926996,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzkyNjk5Ng==","user":{"login":"carere","id":1385328,"node_id":"MDQ6VXNlcjEzODUzMjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1385328?v=4","gravatar_id":"","url":"https://api.github.com/users/carere","html_url":"https://github.com/carere","followers_url":"https://api.github.com/users/carere/followers","following_url":"https://api.github.com/users/carere/following{/other_user}","gists_url":"https://api.github.com/users/carere/gists{/gist_id}","starred_url":"https://api.github.com/users/carere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carere/subscriptions","organizations_url":"https://api.github.com/users/carere/orgs","repos_url":"https://api.github.com/users/carere/repos","events_url":"https://api.github.com/users/carere/events{/privacy}","received_events_url":"https://api.github.com/users/carere/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T15:41:19Z","updated_at":"2018-11-12T15:41:19Z","author_association":"NONE","body":"Hello @mcg-web \r\n\r\nThx for your answer, first of all, my goal is to see that custom field when im introspecting my GraphQL API :)\r\n\r\nI'll try to give you some context: \r\n\r\nOn my admin (made with Vue & Apollo), i introspect my graphql api in order to auto-generate the form for my entites. (I only have one Form.vue which take a string, representing the entity: `User` or `Role`, as parameter to create the form).\r\n\r\nLet's say that i'm creating a form for User edition. Since my user has several roles (User hasMany Role).\r\nI want to provide a select, to my user, a role with an input `select`. For this, i have to know which property to use in order to populate the select (I would like to use the `role` property).\r\n\r\nThat why, when im introspecting my API, i would like to get the property to use for realtion management.\r\n\r\nBut i see that it's more related to GraphQl Spec than your bundle.\r\n\r\nSo i will use a little script in JS on my Vue app for choosing the best property amongs entity property:\r\nI will loop through the property in order to find a property named either `username` or `title` or `firstname` or `lastname`. It's like a mini-ia which gonna choose the right property to display.\r\n\r\nAnyway, your bundle is amazing, i can totally generate my schame based on annotations entity and then introspect that schema in order to auto-generate my admin XD it's just the future XD\r\n\r\nThx again, best regards\r\n\r\nPS: I think you can close this one :)"}}
{"actor":{"display_login":"carere"}}