{"action":"closed","issue":{"url":"https://api.github.com/repos/prisma/Mongo-Connector-Preview/issues/6","repository_url":"https://api.github.com/repos/prisma/Mongo-Connector-Preview","labels_url":"https://api.github.com/repos/prisma/Mongo-Connector-Preview/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/prisma/Mongo-Connector-Preview/issues/6/comments","events_url":"https://api.github.com/repos/prisma/Mongo-Connector-Preview/issues/6/events","html_url":"https://github.com/prisma/Mongo-Connector-Preview/issues/6","id":381056723,"node_id":"MDU6SXNzdWUzODEwNTY3MjM=","number":6,"title":"Error parsing array filter: The top-level field name must be an alphanumeric string beginning with a lowercase letter","user":{"login":"nikolasburk","id":4058327,"node_id":"MDQ6VXNlcjQwNTgzMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/4058327?v=4","gravatar_id":"","url":"https://api.github.com/users/nikolasburk","html_url":"https://github.com/nikolasburk","followers_url":"https://api.github.com/users/nikolasburk/followers","following_url":"https://api.github.com/users/nikolasburk/following{/other_user}","gists_url":"https://api.github.com/users/nikolasburk/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolasburk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolasburk/subscriptions","organizations_url":"https://api.github.com/users/nikolasburk/orgs","repos_url":"https://api.github.com/users/nikolasburk/repos","events_url":"https://api.github.com/users/nikolasburk/events{/privacy}","received_events_url":"https://api.github.com/users/nikolasburk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-15T08:48:13Z","updated_at":"2018-11-16T13:30:22Z","closed_at":"2018-11-16T13:30:22Z","author_association":"MEMBER","body":"I'm running into an internal server error when sending a query to the Mongo connector through the Playground. Here are the steps to reproduce:\r\n\r\n\r\n1. Start Prisma server with this Docker Compose file:\r\n\r\n```yml\r\nversion: '3'\r\nservices:\r\n  prisma:\r\n    image: prismagraphql/prisma:1.22-alpha\r\n    restart: always\r\n    ports:\r\n    - \"4466:4466\"\r\n    environment:\r\n      PRISMA_CONFIG: |\r\n        port: 4466\r\n        databases:\r\n          default:\r\n            connector: mongo\r\n            host: mongo\r\n            port: 27017\r\n            user: prisma\r\n            password: prisma\r\n            migrations: true\r\n            rawAccess: false\r\n  mongo:\r\n    image: mongo:3.6\r\n    restart: always\r\n    environment:\r\n      MONGO_INITDB_ROOT_USERNAME: prisma\r\n      MONGO_INITDB_ROOT_PASSWORD: prisma\r\n    ports:\r\n      - \"27017:27017\"\r\n    volumes:\r\n      - mongo:/var/lib/mongo\r\nvolumes:\r\n  mongo:\r\n```\r\n\r\n2. Deploy a Prisma service with this configuration:\r\n\r\n**prisma.yml**\r\n\r\n```yml\r\nendpoint: http://localhost:4466/hello/dev\r\ndatamodel: datamodel.prisma\r\ndatabaseType: document\r\n\r\ngenerate:\r\n  - generator: javascript-client\r\n    output: ./generated/prisma-client/\r\n  - generator: graphql-schema\r\n    output: ./generated/\r\n```\r\n\r\n**datamodel.prisma**\r\n\r\n```graphql\r\ntype User @db(name: \"user\") {\r\n  id: ID! @id\r\n  email: String! @unique\r\n  name: String!\r\n  posts: [Post!]! @relation(strategy: EMBED)\r\n}\r\n\r\ntype Post @db(name: \"post\") {\r\n  id: ID! @id\r\n  wasCreated: DateTime! @createdAt\r\n  wasUpdated: DateTime! @updatedAt\r\n  title: String!\r\n  published: Boolean @default(value: false)\r\n  author: User\r\n  comments: [Comment!]!\r\n}\r\n\r\ntype Comment @embedded {\r\n  text: String!\r\n  writtenBy: User!\r\n}\r\n``` \r\n\r\n3. In a Playground, first create a new `User`:\r\n\r\n```graphql\r\nmutation {\r\n  createUser(data: {\r\n    name: \"Bob\"\r\n    email: \"bob@prisma.io\"\r\n  }) {\r\n    id\r\n  }\r\n}\r\n```\r\n\r\n4. Now send a nested mutation:\r\n\r\n```graphql\r\nmutation {\r\n  createUser(data: {\r\n    email:\"alice@prisma.io\"\r\n    name: \"Alice\"\r\n    posts: {\r\n      create: {\r\n        title: \"Hello World\"\r\n        published: true\r\n        comments: {\r\n          create: {\r\n            text: \"Hello\"\r\n            writtenBy: {\r\n              connect: {\r\n                email: \"bob@prisma.io\"\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }) {\r\n    id\r\n  }\r\n}\r\n``` \r\n\r\n5. This causes an internal server error, these are the logs from the Docker container:\r\n\r\n```\r\ncom.mongodb.MongoWriteException: Error parsing array filter: The top-level field name must be an alphanumeric string beginning with a lowercase letter, found 'commentsX_idX1016887557'\r\n\tat com.mongodb.async.client.MongoCollectionImpl$9.onResult(MongoCollectionImpl.java:1039)\r\n\tat com.mongodb.async.client.MongoCollectionImpl$9.onResult(MongoCollectionImpl.java:1026)\r\n\tat com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49)\r\n\tat com.mongodb.async.client.OperationExecutorImpl$2$1.onResult(OperationExecutorImpl.java:117)\r\n\tat com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49)\r\n\tat com.mongodb.operation.OperationHelper$ConnectionReleasingWrappedCallback.onResult(OperationHelper.java:379)\r\n\tat com.mongodb.operation.MixedBulkWriteOperation.addBatchResult(MixedBulkWriteOperation.java:483)\r\n\tat com.mongodb.operation.MixedBulkWriteOperation.access$1500(MixedBulkWriteOperation.java:67)\r\n\tat com.mongodb.operation.MixedBulkWriteOperation$6.onResult(MixedBulkWriteOperation.java:468)\r\n\tat com.mongodb.operation.MixedBulkWriteOperation$6.onResult(MixedBulkWriteOperation.java:443)\r\n\tat com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49)\r\n\tat com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor$2.onResult(DefaultServer.java:227)\r\n\tat com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49)\r\n\tat com.mongodb.internal.connection.CommandProtocolImpl$1.onResult(CommandProtocolImpl.java:85)\r\n\tat com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection$1.onResult(DefaultConnectionPool.java:461)\r\n\tat com.mongodb.internal.connection.UsageTrackingInternalConnection$2.onResult(UsageTrackingInternalConnection.java:111)\r\n\tat com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$2$1.onResult(InternalStreamConnection.java:379)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$2$1.onResult(InternalStreamConnection.java:356)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback$MessageCallback.onResult(InternalStreamConnection.java:651)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback$MessageCallback.onResult(InternalStreamConnection.java:618)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:494)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:491)\r\n\tat com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:236)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection.readAsync(InternalStreamConnection.java:491)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection.access$1000(InternalStreamConnection.java:74)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback.onResult(InternalStreamConnection.java:608)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback.onResult(InternalStreamConnection.java:593)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:494)\r\n\tat com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:491)\r\n\tat com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:236)\r\n\tat com.mongodb.connection.netty.NettyStream.handleReadResponse(NettyStream.java:266)\r\n\tat com.mongodb.connection.netty.NettyStream.access$600(NettyStream.java:66)\r\n\tat com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:325)\r\n\tat com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:322)\r\n\tat io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)\r\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)\r\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)\r\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)\r\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624)\r\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559)\r\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476)\r\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)\r\n\tat io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n\r\n```"}}
{"actor":{"display_login":"do4gr"}}