Is this a bug? graphql.service.ts::buildFilterQuery fails when using directly using a complex object #1128
-
When the column has a complex object and references it's nested fields, a null pointer exception occurs. Can reproduce by adding this test in
I've managed a fix by changing the
By passing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I haven't used the GraphQL one in a while, please open a Pull Request if you found an issue and a fix. Thank you. Also FYI, the Example 10 does use complex object as can be seen in this column, that demo only shows the query string since I didn't have a GraphQL server to show the demo, but typically the query string is enough to demo the feature. isn't your proposed code doing the same thing though? I mean Just for reference, I assume you're looking at this piece of code, I would be happy to receive any PR with an explanation. thanks slickgrid-universal/packages/graphql/src/services/graphql.service.ts Lines 196 to 200 in 37d0c3c |
Beta Was this translation helpful? Give feedback.
Thanks, I've opened a PR request with an explanation of why "null coalescing" to
undefined
works#1130
but will also address here
set(o[k] is undefined then pass undefined // this is true, but I'm also saying
set(o[k] is null then pass undefined // which makes use of the property's default property which null doesn't (null stays null)