Issue retrieving event id from recurring events, hide_subsequent_recurrences
or tribeHideRecurrenceDefault
not affecting queries
#60
Labels
bug
Something isn't working
Tested in both:
TEC 6.1.3 + Pro 6.1.1 (with ql-events/feature/events-query-fix PR, otherwise
events
query returns empty, see #59 )TEC 6.0.3.1 + Pro 6.0.2
QL events 0.3.0
When using graphQL to retrieve recurring events, the
eventId
is depreciated for thedatabaseId
, but thedatabaseId
field gives the occurrence id. In the database, occurrence_ids are associated with the parentevent_id
post ID that originally created the event. There is currently no registered graphql field that gets the event_id associated with an occurrence.For example, if you want to retrieve the event series ID associated with a given recurring event to run a separate
tribeEventSerie
query, the only event data retrieved in theevents
query that contains that event_id is the&p=x
or038;p
parameter value in theguid
field.It's definitely a hacky way to go about getting the series id, but it does work when using
tec_event_series
:The other issue is that when
tribeHideRecurrenceDefault
is set to true in TEC Settings, this setting is not applied to the GQL queries. I tried the fork in #22, but this did not hide recurring events beyond the next upcoming recurring event in a series.There is no
hide_subsequent_recurrences
in the where arguments. I tried to create ahide_subsequent_recurrences
where arg and call theCondense_Events_Series
class controller inEvent_Connection_Resolver::sanitize_input_fields
if that where arg is true, but was receiving anUndefined constant
graphql error when calling that controller.This latter issue is imperative for our work: We want to be able to query all single events and only the next upcoming recurring event in series within a given date.
The text was updated successfully, but these errors were encountered: