- In Config.yml Replace
CONTENT_ITEM_TYPES:
- ContentItem
- UniversalContentItem
- DevotionalContentItem
- MediaContentItem
With
CONTENT_ITEM:
ContentSeriesContentItem:
# When resolving "ContentSeriesContentItem" look in rock for a "ContentChannelItem"
EntityType: ContentChannelItem
# Used to define the subset of content channels types that use this specific type.
ContentChannelTypeId: [6, 7]
DevotionalContentItem:
EntityType: ContentChannelItem
ContentChannelTypeId: [1]
MediaContentItem:
EntityType: ContentChannelItem
UniversalContentItem:
EntityType: ContentChannelItem
ContentItem:
EntityType: ContentChannelItem
Delete SERIES_CONTENT_CHANNEL_TYPE_IDS: and DEVOTIONAL_TYPE_IDS:
- In
src/data/index.js
- Remove
Interactionsimport and delete folderdata/interactions. - Remove
RockConstantsimport and deleteconnectorsfolder and all contents. - Add below code to top of file
import {
Followings,
Interactions,
RockConstants,
} from '@apollosproject/data-connector-rock-actions';
- Add
Followings,to the data object.
- In
package.json
- Add
"@apollosproject/data-connector-rock-actions": "^0.8.0-alpha.X",to your dependencies. (Replace X with latest release.)
- In
content-single/getContentItem.js
- Add
likedCountandsummarytocontentItemFragment.
- In
src/ui/LikeButton/index.js
- (line 33-35) Change
updateLikeEntityprop ofMutationto
id: itemId, // unknown at this time
isLiked: !isLiked,
__typename: item.__typename,
- (line 33-35) Change
updateLikeEntity: { operation },intoupdateLikeEntity: { isLiked: liked }, - (line 53) Change
isLiked: operation === 'Like',toisLiked: liked,
- In
src/ui/LikeButton/updateLikeEntity.js
- Add
isLikedto the mutation result fields and removeoperationandinteractionDateTime
- In config.yml
- Add
APP.DEEP_LINK_HOSTconfig field. This field is used for the protocol when deep linking. Leave blank if you don't know yet.
APP:
# This variable is used for generating deep links.
# It should match whatver is in your Info.plist `CFBundleURLTypes`
DEEP_LINK_HOST: newspringchurchapp
- Add
CONTENT_ITEM_TYPEStoROCK_MAPPINGS. This is used to reference all the different content item types. You should be safe to use the below as a default.
CONTENT_ITEM_TYPES:
- ContentItem
- UniversalContentItem
- DevotionalContentItem
- MediaContentItem
- Add
INTERACTIONStoROCK_MAPPINGS. Change your values to match your team / project
INTERACTIONS:
# Name of the InteractionChannel that will be created
CHANNEL_NAME: Apollos App
# Name of the InteractionComponent that will be created for Content Items
COMPONENT_NAME: Apollos Content Item
# 512 is "Mobile App"
CHANNEL_MEDIUM_TYPE_ID: 512