https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • m

    monkeybonkey

    01/27/2017, 11:24 PM
    what data type should I use for a JSON field type when I call the mutation, e.g. mutation
    createEvent($someObject: WHATGOESHERE?
  • s

    sorenbs

    01/27/2017, 11:36 PM
    I believe it should be Json
  • n

    nilan

    01/28/2017, 3:32 AM
    you can also read that up in GraphiQL
  • n

    nilan

    01/28/2017, 3:32 AM
    in the GraphiQL docs
  • n

    nilan

    01/28/2017, 3:52 AM
    hey @tonietto 👋
  • m

    monkeybonkey

    01/28/2017, 3:59 AM
    hey guys - so I’m getting a scala error - I deleted a required field from my model and the query is still expecting it
  • m

    monkeybonkey

    01/28/2017, 3:59 AM
    when I try to do a create mutation
  • m

    monkeybonkey

    01/28/2017, 4:00 AM
    Error `Query does not pass validation. Violations: Cannot query field ‘oldDeletedField’ on type … line 5 column 5 ...
  • n

    nilan

    01/28/2017, 4:01 AM
    can you go ahead and make some schema changes?
  • n

    nilan

    01/28/2017, 4:02 AM
    for example, change the description of any model
  • m

    monkeybonkey

    01/28/2017, 4:03 AM
    made an edit - but still giving me an error
  • m

    monkeybonkey

    01/28/2017, 4:03 AM
    should I try renaming the field and then renaming it back?
  • n

    nilan

    01/28/2017, 4:04 AM
    does that error occur when you run the mutation
  • n

    nilan

    01/28/2017, 4:04 AM
    or did GraphiQL complain before execution?
  • m

    monkeybonkey

    01/28/2017, 4:04 AM
    only after I run the mutation in the response do I get the error
  • m

    monkeybonkey

    01/28/2017, 4:05 AM
    and looking in the db - the insert happens
  • m

    monkeybonkey

    01/28/2017, 4:05 AM
    GraphIQL does not complain and autocompletes the correct updated fields
  • n

    nilan

    01/28/2017, 4:07 AM
    hmm so the error is returned in the error part of the response?
  • n

    nilan

    01/28/2017, 4:07 AM
    can you send a Screenshots?
  • m

    monkeybonkey

    01/28/2017, 4:07 AM
    Copy code
    {
      "data": {
        "createEvent": null
      },
      "errors": [
        {
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
          "path": [
            "createEvent"
          ],
          "code": 4011,
          "message": "Something unexpected happened in an Action: 'Query does not pass validation. Violations:\n\nCannot query field 'title' on type 'Event'. (line 5, column 5):\n    title\n    ^' - 'sangria.execution.Executor.execute(Executor.scala:86),sangria.execution.Executor$.execute(Executor.scala:351),cool.graph.client.mutactions.SyncDataItemToAlgolia.performQueryWith(SyncDataItemToAlgolia.scala:120),cool.graph.client.mutactions.SyncDataItemToAlgolia.execute(SyncDataItemToAlgolia.scala:66),cool.graph.ClientMutation.cool$graph$ClientMutation$$runWithErrorHandler$1(ClientMutation.scala:107),cool.graph.ClientMutation$$anonfun$cool$graph$ClientMutation$$performGroup$1$1.apply(ClientMutation.scala:118),cool.graph.ClientMutation$$anonfun$cool$graph$ClientMutation$$performGroup$1$1.apply(ClientMutation.scala:116),scala.collection.immutable.List.map(List.scala:273),cool.graph.ClientMutation.cool$graph$ClientMutation$$performGroup$1(ClientMutation.scala:116),cool.graph.ClientMutation$$anonfun$2$$anonfun$apply$6.apply(ClientMutation.scala:134),cool.graph.ClientMutation$$anonfun$2$$anonfun$apply$6.apply(ClientMutation.scala:134),cool.graph.FutureUtils$.runFuturesInSerial(Utils.scala:157),cool.graph.FutureUtils$$anonfun$runFuturesInSerial$1.apply(Utils.scala:157),cool.graph.FutureUtils$$anonfun$runFuturesInSerial$1.apply(Utils.scala:157),scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253),scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251),scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32),scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121),scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260),scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253),scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346),scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979),scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)'",
          "requestId": "ciygptxykcw8s01594v91tuug"
        }
      ]
    }
  • n

    nilan

    01/28/2017, 4:08 AM
    ahh
  • n

    nilan

    01/28/2017, 4:08 AM
    seems to be another Algolia bug then
  • n

    nilan

    01/28/2017, 4:08 AM
    or rather
  • n

    nilan

    01/28/2017, 4:09 AM
    is the field still included in your Algolia index?
  • m

    monkeybonkey

    01/28/2017, 4:09 AM
    ah yes it is - lemme remove it and see what haappens
  • n

    nilan

    01/28/2017, 4:09 AM
    👍
  • m

    monkeybonkey

    01/28/2017, 4:09 AM
    it’s good now
  • n

    nilan

    01/28/2017, 4:13 AM
    cool!
  • n

    nilan

    01/28/2017, 4:13 AM
    I'll add an issue anyway
  • m

    monkeybonkey

    01/28/2017, 4:16 AM
    maybe a more descriptive error would be enough
1...909192...637Latest