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

events query does not return correct databaseId, eventsCategories data #64

Open
hcavanaugh opened this issue Jan 17, 2024 · 2 comments
Open

Comments

@hcavanaugh
Copy link

hcavanaugh commented Jan 17, 2024

Tested with:
The Events Calendar 6.2.2.1, 6.2.3+
The Events Calendar Pro 6.2.4
QL Events 0.3.1

Since TEC 6.2.3, the databaseIds returned when performing an events query does not match the post ID. As a result, the eventsCategories nodes are returning empty, even though there are categories associated with those posts.

Here is the query results sample when running events(where: {startsAfter: "now", status: PUBLISH} first: 50) in 6.2.2.1:

        {
          "databaseId": 100211, //This is the ID seen in the post editor URL. Querying event(id: "100211", idType: DATABASE_ID) returns the same data
          "id": "cG9zdDoxMDAyMTE=",
          "title": "Test Event",
          "startDate": "2024-05-30 17:30:00",
          "eventsCategories": {
            "nodes": [
              {
                "name": "Conversations",
                "id": "dGVybTo0MQ=="
              }
            ]
          }
        }

Versus since 6.2.3:

{
          "databaseId": 10001167, //Querying event(id: "100211", idType: DATABASE_ID) returns the data seen in 6.2.2.1
          "id": "cG9zdDoxMDAwMTE2Nw==",
          "title": "Test Event",
          "startDate": "2024-05-30 17:30:00",
          "eventsCategories": {
            "nodes": [] 
          }
        }

This event sample is a single event, not recurring or part of a series.
The issue is that we can't use TEC below 6.2.3, as that fixes the lodash error that occurs since WP 6.4. So we are in a stalemate on querying events until this is fixed.

@hcavanaugh
Copy link
Author

Update: Recurring events in the event query are not returning any node content in eventCategories either. TEC REST API using the recurring event instance ID is returning event categories as expected. @kidunot89 I'm sure if you are still active on this project. This bug prevents us from using WPGraphQL not only for events queries, but event now as well.

@danimalweb
Copy link

I have the same issue. Any update? Would love to use eventsCategories but nothing is returned.

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

No branches or pull requests

2 participants