Graph QL Logical AND operation on Different Objects in an entity

Viewed 274

I am trying to hit a graphQl query where I want to get the data available in a certain period using below query:

Requirement is to pull the data where eventDates endTime value is >= 1583831471000 OR recurrence endTime value is >= 1583831471000. These two conditions work if specified separately but don't work together.

{Events(where:{
widgetId: {EQ: "3585"},
category: {
        deleted: {EQ: false}
},
 OR:[{eventDates: {
   endTime: { NE: null } AND: {endTime: { GE: 1583831471000 }} }},
  {recurrence:{
  endTime: { NE: null } AND: {endTime: { GE: 1583831471000 }}}}]
}page:{start:1 limit: 10}) {


Also tried,

OR: [{eventDates: { endTime: { GE: 1583831471000 } }, recurrence: {endTime: {GE: 1583831471000}}}]

Schema looks like below:

eventDates:
input ONEDatesCriteriaExpression {
  OR: [ONEDatesCriteriaExpression]
  AND: [ONEDatesCriteriaExpression]
  EXISTS: [ONEDatesSubqueryCriteriaExpression]
  NOT_EXISTS: [ONEDatesSubqueryCriteriaExpression]
  contentType: contentTypeONEDateCriteria
  createdBy: createdByBaseEntityCriteria
  lastModifiedBy: lastModifiedByBaseEntityCriteria
  startTime: startTimeONEDateCriteria
  deleted: deletedBaseEntityCriteria
  id: idBaseEntityCriteria
  endTime: endTimeONEDateCriteria
  creationTime: creationTimeBaseEntityCriteria
  modificationTime: modificationTimeBaseEntityCriteria
}

endTime :
input endTimeONEDateCriteria {
  OR: [endTimeONEDateCriteria]
  AND: [endTimeONEDateCriteria]
  EQ: Long
  NE: Long
  LE: Long
  GE: Long
  GT: Long
  LT: Long
  IS_NULL: Boolean
  NOT_NULL: Boolean
  IN: [Long]
  NIN: [Long]
  BETWEEN: [Long]
  NOT_BETWEEN: [Long]
}

recurrence Object:
input EventRecurrencesCriteriaExpression {
  OR: [EventRecurrencesCriteriaExpression]
  AND: [EventRecurrencesCriteriaExpression]
  EXISTS: [EventRecurrencesSubqueryCriteriaExpression]
  NOT_EXISTS: [EventRecurrencesSubqueryCriteriaExpression]
  frequency: frequencyEventRecurrenceCriteria
  lastModifiedBy: lastModifiedByBaseEntityCriteria
  endDateType: endDateTypeEventRecurrenceCriteria
  onSubType: onSubTypeEventRecurrenceCriteria
  onType: onTypeEventRecurrenceCriteria
  modificationTime: modificationTimeBaseEntityCriteria
  createdBy: createdByBaseEntityCriteria
  endTime: endTimeEventRecurrenceCriteria
  repeatType: repeatTypeEventRecurrenceCriteria
  onDay: onDayEventRecurrenceCriteria
  deleted: deletedBaseEntityCriteria
  id: idBaseEntityCriteria
  startTime: startTimeEventRecurrenceCriteria
  creationTime: creationTimeBaseEntityCriteria
  endAfterNumberOfOccurrences: endAfterNumberOfOccurrencesEventRecurrenceCriteria
  weekDays: EventRecurrenceDaysRelationCriteriaExpression
}

endTime:

input endTimeEventRecurrenceCriteria {
  OR: [endTimeEventRecurrenceCriteria]
  AND: [endTimeEventRecurrenceCriteria]
  EQ: Long
  NE: Long
  LE: Long
  GE: Long
  GT: Long
  LT: Long
  IS_NULL: Boolean
  NOT_NULL: Boolean
  IN: [Long]
  NIN: [Long]
  BETWEEN: [Long]
  NOT_BETWEEN: [Long]
}
0 Answers
Related