Closed pcermak closed 3 years ago
Comment to team: I know for a fact that our developer was working on adding support for returning NULL instead of empty value, and that this was supposedly released in 4.1.2 https://market.enonic.com/vendors/enonic/guillotine-headless-lib.
Pls investigate what was changed before moving forward.
@anatol-sialitski the actual fix was in lib-graphql, not in guillotine
But why is this mentioned in the guillotine release notes then?
Also, I believe this was fixed in guillotine based on that another user had the same problem (missing NULL return value)? So, something must have happened to make it "disappear" again?
I ran into this issue, and I think it stems from starter-headless
. It appears it's POST endpoint isn't JSON.stringify
-ing the GraphQL response... replacing graphQlLib.execute(...)
with JSON.stringify(graphQlLib.execute(...))
fixed my occurance of this issue.
https://github.com/enonic/starter-headless/blob/master/src/main/resources/controllers/graphql.js#L164
@nerdkid93 Thanks, we have merged your PR in the Headless Starter repo and released a new version.
When we define a content type with optional variables and the variables are not used (empty) the Guillotine returns result without the variables. So the variables are not included in the result at all. See the picture attached - title, department
For our purposes it would be better if the optional variables were included in the result set any time. In case they are empty the return values will be null