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

Enabling GraphQL support duplicates entries in CP index views four times #27

Open
howells opened this issue Sep 23, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@howells
Copy link

howells commented Sep 23, 2022

A strange one: when I enable Star Rating's GraphQL (I really need to grab an entry's total votes via GQL), it has the strange effect of duplicating the number of times an entry is shown on a section that has star ratings enabled by a factor of 4.

Without GraphQL enabled:

CleanShot 2022-09-23 at 17 23 45@2x

With GraphQL enabled:

CleanShot 2022-09-23 at 17 21 04@2x

Any ideas why that would be?

@lindseydiloreto
Copy link
Contributor

Interesting, that's not ideal. I may have seen that issue before, which is part of why GraphQL support is still in beta.

In order for the GraphQL stuff to work, Star Ratings gets involved in Craft's element query on a very deep level. It's a very heavy-handed way to get the GraphQL stuff to behave as necessary. I don't love the implementation, but it's the best we could do at the time.

In the long-term, I'll fix it before GraphQL support graduates from beta. I'm not sure exactly when that will be, but it probably won't be anytime soon. My apologies, we have a handful of higher priorities at this moment.

In the short-term, could you potentially disable the GraphQL support while you make content changes?

@lindseydiloreto lindseydiloreto added the bug Something isn't working label Sep 23, 2022
@howells
Copy link
Author

howells commented Oct 5, 2022

@lindseydiloreto if it were my own project I'd be happy to disable it while making changes but I wouldn't be able to get my client to do that. Can you think of any way I could get around it... do you think I could use a preparse field somehow to calculate on save? Just means I'll have to periodically resave the entries.

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

No branches or pull requests

2 participants