Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMIT: Invalid input. '10.0' is not a valid value. Must be a non-negative integer.", #208

Closed
reaperdtme opened this issue May 16, 2021 · 4 comments · Fixed by #230
Closed
Labels
bug Something isn't working

Comments

@reaperdtme
Copy link

Describe the bug
Simple query on a model with a limit or skip parameter in the gql query

query Patients($where: PatientWhere!, $options: PatientOptions) {
  patients(where: $where, options: $options) {
    id
    firstName
    middleName
    lastName
  }
}
{
	"where": {},
	"options": {
                 "limit": 10,
		"sort": [
			{
				"lastName": "ASC"
			}
		]
	}
}

Expected behavior
Skip and limit to work

System (please complete the following information):
"@neo4j/graphql": "^1.0.1"
"@neo4j/graphql-ogm": "^1.0.1"
"neo4j-driver": "^4.2.3",
Neo4J: Version 1.4.3 (1.4.3.49)

Additional context
After editing this line

cypherParams[`${varName}_limit`] = optionsInput.limit;

to be

cypherParams[`${varName}_limit`] = neo4j.int(optionsInput.limit)

The query successfully runs

@reaperdtme reaperdtme added bug Something isn't working inbox labels May 16, 2021
@darrellwarde
Copy link
Contributor

This is sadly not just a single-fix solution - this is linked to both #186 and #167. As such, sadly it is not such a simple solution, but we are on it and will be addressing this ASAP!

@oskarhane
Copy link
Member

@aspectgfg Hi, to make sure we cover all the cases and setups when looking into this, can I ask you to create a repo or example setup where you see this behavior?
Out of the box without any other dependencies this is not an issue, that's why it's important to us to see what the different setups where this happens looks like.

@darrellwarde darrellwarde linked a pull request Jun 2, 2021 that will close this issue
6 tasks
@darrellwarde
Copy link
Contributor

A fix (hopefully!) for this has now been merged, and will be released shortly (aiming for tomorrow). Please do test and feel free to reopen this ticket if it hasn't addressed your problems! 🙂

@darrellwarde
Copy link
Contributor

After much back and forth of thinking we had fixed this bug, it should finally be fully fixed by #297. 🤞 Apologies it took a while to get to this stage, it was a tricky bug to find but then very clear once we had found it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants