Last active
January 25, 2020 18:45
-
-
Save lynndylanhurley/889abbe9f92d227eafcabb1f9b562f5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let(:index_req) do | |
{ | |
data: { | |
appContentScope: { | |
id: app_scope.id, | |
fields: ['name'], | |
include: { | |
categoryAppContentScopes: { | |
filter: { appContentScopeId: { fromContext: 'appContentScope.id' } }, | |
sort: [{ field: 'position', direction: 'asc' }], | |
fields: %w[appContentScopeId categoryId position], | |
include: { | |
category: { | |
id: { fromContext: 'categoryAppContentScope.categoryId' }, | |
fields: ['name'], | |
include: { | |
deckCategories: { | |
filter: { categoryId: { fromContext: 'category.id' } }, | |
sort: [{ field: 'position', direction: 'asc' }], | |
fields: %w[position deckId categoryId deckType], | |
include: { | |
deck: { | |
id: { fromContext: 'deckCategory.deckId' }, | |
if: { attribute: { fromContext: 'deckCategory.deckType' }, | |
matches: 'Deck' }, | |
fields: ['name'] | |
}, | |
quizDeck: { | |
id: { fromContext: 'deckCategory.deckId' }, | |
if: { attribute: { fromContext: 'deckCategory.deckType' }, | |
matches: 'QuizDeck' }, | |
fields: ['name'] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment