{"action":"created","issue":{"url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/1327","repository_url":"https://api.github.com/repos/aws-amplify/amplify-js","labels_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/1327/labels{/name}","comments_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/1327/comments","events_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/1327/events","html_url":"https://github.com/aws-amplify/amplify-js/issues/1327","id":345331270,"node_id":"MDU6SXNzdWUzNDUzMzEyNzA=","number":1327,"title":"AppSync - Subscription with type [String] different behavior in Amplify and AWS console 'Query' IDE.","user":{"login":"tandeson","id":7401929,"node_id":"MDQ6VXNlcjc0MDE5Mjk=","avatar_url":"https://avatars1.githubusercontent.com/u/7401929?v=4","gravatar_id":"","url":"https://api.github.com/users/tandeson","html_url":"https://github.com/tandeson","followers_url":"https://api.github.com/users/tandeson/followers","following_url":"https://api.github.com/users/tandeson/following{/other_user}","gists_url":"https://api.github.com/users/tandeson/gists{/gist_id}","starred_url":"https://api.github.com/users/tandeson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tandeson/subscriptions","organizations_url":"https://api.github.com/users/tandeson/orgs","repos_url":"https://api.github.com/users/tandeson/repos","events_url":"https://api.github.com/users/tandeson/events{/privacy}","received_events_url":"https://api.github.com/users/tandeson/received_events","type":"User","site_admin":false},"labels":[{"id":908644775,"node_id":"MDU6TGFiZWw5MDg2NDQ3NzU=","url":"https://api.github.com/repos/aws-amplify/amplify-js/labels/AppSync","name":"AppSync","color":"8bedce","default":false},{"id":772762686,"node_id":"MDU6TGFiZWw3NzI3NjI2ODY=","url":"https://api.github.com/repos/aws-amplify/amplify-js/labels/investigating","name":"investigating","color":"006b75","default":false}],"state":"open","locked":false,"assignee":{"login":"manueliglesias","id":6154160,"node_id":"MDQ6VXNlcjYxNTQxNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/6154160?v=4","gravatar_id":"","url":"https://api.github.com/users/manueliglesias","html_url":"https://github.com/manueliglesias","followers_url":"https://api.github.com/users/manueliglesias/followers","following_url":"https://api.github.com/users/manueliglesias/following{/other_user}","gists_url":"https://api.github.com/users/manueliglesias/gists{/gist_id}","starred_url":"https://api.github.com/users/manueliglesias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manueliglesias/subscriptions","organizations_url":"https://api.github.com/users/manueliglesias/orgs","repos_url":"https://api.github.com/users/manueliglesias/repos","events_url":"https://api.github.com/users/manueliglesias/events{/privacy}","received_events_url":"https://api.github.com/users/manueliglesias/received_events","type":"User","site_admin":false},"assignees":[{"login":"manueliglesias","id":6154160,"node_id":"MDQ6VXNlcjYxNTQxNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/6154160?v=4","gravatar_id":"","url":"https://api.github.com/users/manueliglesias","html_url":"https://github.com/manueliglesias","followers_url":"https://api.github.com/users/manueliglesias/followers","following_url":"https://api.github.com/users/manueliglesias/following{/other_user}","gists_url":"https://api.github.com/users/manueliglesias/gists{/gist_id}","starred_url":"https://api.github.com/users/manueliglesias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manueliglesias/subscriptions","organizations_url":"https://api.github.com/users/manueliglesias/orgs","repos_url":"https://api.github.com/users/manueliglesias/repos","events_url":"https://api.github.com/users/manueliglesias/events{/privacy}","received_events_url":"https://api.github.com/users/manueliglesias/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-07-27T18:53:51Z","updated_at":"2018-08-03T04:38:33Z","closed_at":null,"author_association":"NONE","body":"Do you want to request a feature or report a bug?\r\nI think this is a bug - however, I can't find the behavior clearly documented in the GraphQL docs - so it may be a feature.\r\n\r\nWhat is the current behavior?\r\nSubscriptions with a item filter of [String] behave differently in AWS Console and AWS Amplify. In the AWS Console, I get events when I listen with a string into a list of strings, and in Amplify I do not get any returned data.\r\n\r\nI have a server Scheme which passes message in a 1-to-many format.\r\n\r\nI would like to subscribe so that only the receive gets a message ( so the data type has a list of strings, but only subscribe if you match one of them).\r\n\r\nPart of the server side schema\r\n```\r\ninput StartCallInput {\r\n\tfrom_user_id: String!\r\n\tfrom_user_username: String!\r\n\tto_user_ids: [String]!\r\n\tcall_type: CallType!\r\n}\r\n\r\ntype StartCallResponse {\r\n\tsession_id: String!\r\n\ttoken: String\r\n\tfrom_user_id: String\r\n\tto_user_id: [String]\r\n\tfrom_bolt_user: String\r\n\tcall_type: String\r\n}\r\n\r\ntype Mutation {\r\n\tstartCall(input: StartCallInput!): StartCallResponse\r\n}\r\n\r\ntype Subscription {\r\n\tonCallStarted(to_user_id: [String], from_user_id: String): StartCallResponse\r\n\t\t@aws_subscribe(mutations: [\"startCall\"])\r\n}\r\n\r\n```\r\n\r\n\r\nWhat is the expected behavior?\r\nIn the AWS Console IDE the subscription below returned the record when tested with a list with 7d0773ff-2c48-412c-a6e0-0eb275f2fa73 present\r\n```\r\nsubscription watchForNewCalls {\r\n  onCallStarted(to_user_id:\"7d0773ff-2c48-412c-a6e0-0eb275f2fa73\") {\r\n    session_id\r\n    token\r\n    from_user_id\r\n    to_user_id\r\n    from_bolt_user\r\n    call_type\r\n  }\r\n}\r\n```\r\n\r\nNote that passing in a list of one item also worked\r\n```\r\n onCallStarted(to_user_id:[\"7d0773ff-2c48-412c-a6e0-0eb275f2fa73\"])\r\n```\r\n\r\nIn my Angular 6.0 App, using Angular Amplify - I could not get any subscription responses with this list item (see code snippets below). When I filtered on from_user_id instead ( a String  not a [String] ), the returned data was as expected.\r\n\r\nFunction to call AWS Amplify AppSync\r\n```\r\n// Generic Start Subscription call ( note the Zen Observable instead of a RxJs Observable)\r\n  appSyncStartSubscription( subscriptionCall: String, ParameterValues?: any ): Observable<object> {\r\n    return API.graphql( graphqlOperation( subscriptionCall, ParameterValues ) ) as Observable<object>;\r\n  }\r\n```\r\n\r\npassing in for Subscription\r\n```\r\nexport const SubscribeToEventNewDevices = `subscription watchForNewCalls( $to_user_id: [String]) {\r\n  onCallStarted( to_user_id:$to_user_id ) {\r\n    session_id\r\n    token\r\n    from_user_id\r\n    to_user_id\r\n    from_bolt_user\r\n    call_type\r\n  }\r\n}`;\r\n```\r\n\r\nand data is\r\n```\r\n    const myIdInfo  = {\r\n       to_user_id: '7d0773ff-2c48-412c-a6e0-0eb275f2fa73',\r\n    };\r\n```\r\nI have also tried\r\n```\r\n    const myIdInfo  = {\r\n       to_user_id: ['7d0773ff-2c48-412c-a6e0-0eb275f2fa73'],\r\n    };\r\n```\r\nWhich versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?\r\nI am using Firefox 61.0.1 (64-bit) on Windows 10\r\n\r\nng --version\r\n\r\nAngular CLI: 6.0.7\r\nNode: 8.9.1\r\nOS: win32 x64\r\nAngular: 6.0.3\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage                           Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect         0.6.7\r\n@angular-devkit/build-angular     0.6.8\r\n@angular-devkit/build-optimizer   0.6.8\r\n@angular-devkit/core              0.6.7\r\n@angular-devkit/schematics        0.6.7\r\n@angular/cdk                      6.4.1\r\n@angular/cli                      6.0.7\r\n@angular/flex-layout              5.0.0-beta.15\r\n@angular/material                 6.4.1\r\n@ngtools/webpack                  6.0.8\r\n@schematics/angular               0.6.7\r\n@schematics/update                0.6.7\r\nrxjs                              6.2.2\r\ntypescript                        2.7.2\r\nwebpack                           4.8.3\r\n\r\nnpm ls aws-amplify\r\n-- aws-amplify@1.0.2\r\n"},"comment":{"url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/comments/410142358","html_url":"https://github.com/aws-amplify/amplify-js/issues/1327#issuecomment-410142358","issue_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/1327","id":410142358,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDE0MjM1OA==","user":{"login":"tandeson","id":7401929,"node_id":"MDQ6VXNlcjc0MDE5Mjk=","avatar_url":"https://avatars1.githubusercontent.com/u/7401929?v=4","gravatar_id":"","url":"https://api.github.com/users/tandeson","html_url":"https://github.com/tandeson","followers_url":"https://api.github.com/users/tandeson/followers","following_url":"https://api.github.com/users/tandeson/following{/other_user}","gists_url":"https://api.github.com/users/tandeson/gists{/gist_id}","starred_url":"https://api.github.com/users/tandeson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tandeson/subscriptions","organizations_url":"https://api.github.com/users/tandeson/orgs","repos_url":"https://api.github.com/users/tandeson/repos","events_url":"https://api.github.com/users/tandeson/events{/privacy}","received_events_url":"https://api.github.com/users/tandeson/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T04:38:33Z","updated_at":"2018-08-03T04:38:33Z","author_association":"NONE","body":"Sorry - I should have closed this. I came in on Monday and it all worked. I think something was happening on the AppSync back end. No code changes on my side, and I no longer can re-create this issue. I can re-open if it happen again, and I'll capture the network request, but again - I don't think this is in the Amplify library at this time."}}
{"actor":{"display_login":"tandeson"}}