Giter Club home page Giter Club logo

Comments (7)

thomaskvael avatar thomaskvael commented on July 21, 2024 7

I am also having the same problem. The example from Strapi doc is not working
https://strapi.io/documentation/3.x.x/guides/graphql.html#query-api
Only workaround is to use a where clause but that returns an array of posts instead of a single post.

Not working:

query {
    post(id: "3") {
      title
      byline
      lead
      content
    }
}

Returns error:
"Undefined binding(s) detected when compiling SELECT query: select posts.* from posts where posts.id = ? limit ?"

Workaround:

query {
    posts(where: {id:"3"}) {
      title
      byline
      lead
      content
    }
}

Node: v10.15.0
Npm: 6.4.1
Strapi: 3.0.0.alpha 21
OS: Windows 10
Database: MySQL

from strapi-examples.

genesos avatar genesos commented on July 21, 2024 3

Alpha 23.1, same issue too.
But I found the error point maybe.

Changing plugins/graphql/service/Query.js
from

              ...this.convertToParams(_.omit(_options, 'where')),
              ..._options.where,

to

              ...this.convertToParams(_.omit(_options, 'where')),
              ..._options,
              ..._options.where,

makes working right temporary.

from strapi-examples.

TetHat avatar TetHat commented on July 21, 2024

Having the same issue here on Strapi version 3.0.0-alpha.22. The referenced issue #2396 (which was fixed in alpha 22) appears to be a different issue entirely since this is still broken in alpha 22.

from strapi-examples.

scorpionking90 avatar scorpionking90 commented on July 21, 2024

I am also facing the same issue. Please provide solution at the earliest as it is stopping me alot. Thanks in advance. I was using 3.0.0.alpha 21, now upgraded to 3.0.0.alpha 22 still i am facing same issues :(

from strapi-examples.

kenberkeley avatar kenberkeley commented on July 21, 2024

Alpha 22, same issue
image

from strapi-examples.

notapatch avatar notapatch commented on July 21, 2024

Workaround is to use mongodb - in stage 1 - setup they use MongoDB (recommended).

Got here because I had the same issue, but using Postgres. I did not get this problem when using MongoDB.

from strapi-examples.

lauriejim avatar lauriejim commented on July 21, 2024

I close this issue, can you check on the mono repo if this issue exist.
It's not related to the example but look like related to the GraphQL plugin.

from strapi-examples.

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.