Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Relationship with posts object as draft return null value which causes internal server error #173

Closed
siddhantdante opened this issue Sep 26, 2020 · 7 comments · May be fixed by #262
Closed

Comments

@siddhantdante
Copy link

Captuasdre
Capasdasdture

@jasonbahl
Copy link
Contributor

I can confirm. Updating the field resolver to use DataLoader should resolve this.

Marking this actionable.

@dChiamp
Copy link

dChiamp commented Apr 5, 2021

ran in to this today too on Version 0.4.0

@wf-ssahakyan
Copy link

Hi @jasonbahl, is it clear when this issue will be resolved? Thanks in advance

@jasonbahl
Copy link
Contributor

I'm working on v0.6.0 right now and this is resolved in that.

It should be released this week or next week.

I'm going to close this issue as it's part of the v0.6 milestone and is addressed by the upcoming release.

jasonbahl added a commit to jasonbahl/wp-graphql-acf that referenced this issue May 13, 2021
Merge branch 'develop' into feature/fix-field-group-prefixing

# Conflicts:
#	vendor/composer/InstalledVersions.php
#	vendor/composer/installed.php
@jasonbahl
Copy link
Contributor

This is resolved by #262.

We can use the relationship field to set a relationship to a published post and a draft post, then query it as a public user and get no errors.

Here, we can see the relationship being set on the post edit screen:

Screen Shot 2021-05-13 at 10 19 15 AM

Before

Querying for this field would return an error:

Screen Shot 2021-05-13 at 10 22 26 AM

After:

Querying the relationship returns the public related nodes, but prevents the private (drafts, in this case) from being returned, and no errors are returned.

Screen Shot 2021-05-13 at 10 26 42 AM

NOTE: The shape of the query has changed for relationship fields in this release. Relationship fields are now "connections" and the connected "nodes" are nested under the nodes field, as seen in the "after" screenshot.

@rodrigo-arias
Copy link
Contributor

I'm glad this has been resolved. Do we have an ETA for release 0.6.0? I know it involves other updates

@arthay
Copy link

arthay commented Jan 5, 2022

@jasonbahl hi. Do you have any news about Release v0.6.0? Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants