Giter VIP home page Giter VIP logo

Comments (5)

williamluke4 avatar williamluke4 commented on September 21, 2024

@Industrial should your options for delete chart not be

const options = {
      where: {
        id: args.chartId,
      },
  }

from prisma-binding.

Industrial avatar Industrial commented on September 21, 2024

I don't think so, but the output is the same.

�[33mapi_1              |�[0m deleteChart options { where: { id: 'cju47t2ef000y0b30sqrm9a5j' } }
�[33mapi_1              |�[0m deleteChart result undefined
�[33mapi_1              |�[0m createChart options { data:
�[33mapi_1              |�[0m    { dashboard: { connect: [Object] },
�[33mapi_1              |�[0m      base: 'ETH',
�[33mapi_1              |�[0m      quote: 'BTC',
�[33mapi_1              |�[0m      from: '2019-04-05T07:00:01.881Z',
�[33mapi_1              |�[0m      to: '2019-04-05T15:20:01.881Z',
�[33mapi_1              |�[0m      period: 'MINUTE1' } }
�[33mapi_1              |�[0m Request to http://prisma:8020:
�[33mapi_1              |�[0m query:
�[33mapi_1              |�[0m mutation createChart($_v0_data: ChartCreateInput!) {
�[33mapi_1              |�[0m   createChart(data: $_v0_data) {
�[33mapi_1              |�[0m     id
�[33mapi_1              |�[0m     from
�[33mapi_1              |�[0m     to
�[33mapi_1              |�[0m     period
�[33mapi_1              |�[0m     dashboard {
�[33mapi_1              |�[0m       id
�[33mapi_1              |�[0m       __typename
�[33mapi_1              |�[0m     }
�[33mapi_1              |�[0m     base
�[33mapi_1              |�[0m     quote
�[33mapi_1              |�[0m     __typename
�[33mapi_1              |�[0m   }
�[33mapi_1              |�[0m }
�[33mapi_1              |�[0m operationName: createChart
�[33mapi_1              |�[0m variables:
�[33mapi_1              |�[0m {
�[33mapi_1              |�[0m   "_v0_data": {
�[33mapi_1              |�[0m     "from": "2019-04-05T07:00:01.881Z",
�[33mapi_1              |�[0m     "to": "2019-04-05T15:20:01.881Z",
�[33mapi_1              |�[0m     "period": "MINUTE1",
�[33mapi_1              |�[0m     "base": "ETH",
�[33mapi_1              |�[0m     "quote": "BTC",
�[33mapi_1              |�[0m     "dashboard": {
�[33mapi_1              |�[0m       "connect": {
�[33mapi_1              |�[0m         "id": "cjql1se4j00060c64v98hwv69"
�[33mapi_1              |�[0m       }
�[33mapi_1              |�[0m     }
�[33mapi_1              |�[0m   }
�[32mprisma_1           |�[0m SLOW QUERY - DURATION: 17
�[32mprisma_1           |�[0m QUERY: [{"query":"mutation createChart($_v0_data: ChartCreateInput!) {\n  createChart(data: $_v0_data) {\n    id\n    from\n    to\n    period\n    dashboard {\n      id\n      __typename\n    }\n    base\n    quote\n    __typename\n  }\n}\n","variables":{"_v0_data":{"from":"2019-04-05T07:00:01.881Z","to":"2019-04-05T15:20:01.881Z","period":"MINUTE1","base":"ETH","quote":"BTC","dashboard":{"connect":{"id":"cjql1se4j00060c64v98hwv69"}}}},"operationName":"createChart"}]
�[33mapi_1              |�[0m }
�[32mprisma_1           |�[0m SLOW QUERY - DURATION: 17
�[32mprisma_1           |�[0m QUERY: [{"query":"mutation createChart($_v0_data: ChartCreateInput!) {\n  createChart(data: $_v0_data) {\n    id\n    from\n    to\n    period\n    dashboard {\n      id\n      __typename\n    }\n    base\n    quote\n    __typename\n  }\n}\n","variables":{"_v0_data":{"from":"2019-04-05T07:00:01.881Z","to":"2019-04-05T15:20:01.881Z","period":"MINUTE1","base":"ETH","quote":"BTC","dashboard":{"connect":{"id":"cjql1se4j00060c64v98hwv69"}}}},"operationName":"createChart"}]
�[33mapi_1              |�[0m Response from http://prisma:8020:
�[33mapi_1              |�[0m {
�[33mapi_1              |�[0m   "createChart": {
�[33mapi_1              |�[0m     "dashboard": {
�[33mapi_1              |�[0m       "id": "cjql1se4j00060c64v98hwv69",
�[33mapi_1              |�[0m       "__typename": "Dashboard"
�[33mapi_1              |�[0m     },
�[33mapi_1              |�[0m     "__typename": "Chart",
�[33mapi_1              |�[0m     "to": "2019-04-05T15:20:01.881Z",
�[33mapi_1              |�[0m     "quote": "BTC",
�[33mapi_1              |�[0m     "base": "ETH",
�[33mapi_1              |�[0m     "id": "cju47tu4b001c0b30qd89o5ej",
�[33mapi_1              |�[0m     "from": "2019-04-05T07:00:01.881Z",
�[33mapi_1              |�[0m     "period": "MINUTE1"
�[33mapi_1              |�[0m   }
�[33mapi_1              |�[0m }
�[33mapi_1              |�[0m createChart result [Object: null prototype] {
�[33mapi_1              |�[0m   id: 'cju47tu4b001c0b30qd89o5ej',
�[33mapi_1              |�[0m   from: '2019-04-05T07:00:01.881Z',
�[33mapi_1              |�[0m   to: '2019-04-05T15:20:01.881Z',
�[33mapi_1              |�[0m   period: 'MINUTE1',
�[33mapi_1              |�[0m   dashboard:
�[33mapi_1              |�[0m    [Object: null prototype] { id: 'cjql1se4j00060c64v98hwv69', __typename: 'Dashboard' },
�[33mapi_1              |�[0m   base: 'ETH',
�[33mapi_1              |�[0m   quote: 'BTC',
�[33mapi_1              |�[0m   __typename: 'Chart' }

from prisma-binding.

williamluke4 avatar williamluke4 commented on September 21, 2024

Could you check the network tab in chrome devtools to see what the response is

from prisma-binding.

Industrial avatar Industrial commented on September 21, 2024

This is from one microservice (API (my public GraphQL API)) to another microservice (Prisma (My private GraphQL API)). The browser is not included in this request.

It does nothing on the API side. It simply resolves the promise with undefined as a value.

Edit: @williamluke4: so the output above is Docker Compose output.

gr,

Tom

from prisma-binding.

sctgraham avatar sctgraham commented on September 21, 2024

I'm having a similar issue when returning this from an Apollo resolver :

      const postInput = { ... }

      return context.prisma.mutation.createPost(postInput, info)
        .then(data => {
          console.log(data)
        }).catch(err => {
          console.log(err)
        });

console.log(data) is returning undefined.
The catch is never triggered even with malformed inputs.

from prisma-binding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.