-
Notifications
You must be signed in to change notification settings - Fork 895
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
entgql nil time field order value cause msgpack panic #1559
Comments
relate issues vmihailenco/msgpack#306 |
Could you add your gql schema / query that's triggering this? |
@alexsn order by a time field with nil value will trigger this, because *time.Time has IsZero, but the value is nil, msgpack will call the IsZero check cause panic |
Can you paste the graphql query that does this? |
query {
data: accounts(orderBy: {field: NextContactAt,direction: ASC}) {
edges {
node {
id
}
cursor
}
totalCount
}
} NextContactAt is a *time.Time field |
Here has a test to reproduce the panic for msgpack |
Is NextContactAt a nillable field? |
@alexsn Yes |
This is fixed in latest msgpack |
Current Behavior 馃槸
v is (*time.Time)(nil), v.IsZero will panic
Expected Behavior 馃
order works
Steps to Reproduce 馃暪
https://github.com/wenerme/ent-demo/blob/fd782eec12be71f29279762951efe942378c2bd1/ent/gql_test.go#L8-L10
Your Environment 馃寧
The text was updated successfully, but these errors were encountered: