Make hero image not required (it is not required in the cms as well)
This commit is contained in:
parent
db97bb1be8
commit
60637d48ed
|
|
@ -524,6 +524,8 @@ export type ContentElementValueInput = {
|
||||||
description?: InputMaybe<Scalars['String']['input']>;
|
description?: InputMaybe<Scalars['String']['input']>;
|
||||||
/** To be used for assignment type */
|
/** To be used for assignment type */
|
||||||
id?: InputMaybe<Scalars['String']['input']>;
|
id?: InputMaybe<Scalars['String']['input']>;
|
||||||
|
/** To be used for assignment type */
|
||||||
|
solution?: InputMaybe<Scalars['String']['input']>;
|
||||||
/** To be used for link_block, text_block types */
|
/** To be used for link_block, text_block types */
|
||||||
text?: InputMaybe<Scalars['String']['input']>;
|
text?: InputMaybe<Scalars['String']['input']>;
|
||||||
/** To be used for image_block, assignment type */
|
/** To be used for image_block, assignment type */
|
||||||
|
|
@ -783,6 +785,7 @@ export enum InputTypes {
|
||||||
ImageUrlBlock = 'image_url_block',
|
ImageUrlBlock = 'image_url_block',
|
||||||
LinkBlock = 'link_block',
|
LinkBlock = 'link_block',
|
||||||
Readonly = 'readonly',
|
Readonly = 'readonly',
|
||||||
|
Solution = 'solution',
|
||||||
Subtitle = 'subtitle',
|
Subtitle = 'subtitle',
|
||||||
TextBlock = 'text_block',
|
TextBlock = 'text_block',
|
||||||
VideoBlock = 'video_block'
|
VideoBlock = 'video_block'
|
||||||
|
|
@ -947,7 +950,7 @@ export type ModuleEdge = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ModuleInterface = {
|
export type ModuleInterface = {
|
||||||
heroImage: WagtailImageNode;
|
heroImage?: Maybe<WagtailImageNode>;
|
||||||
/** The ID of the object */
|
/** The ID of the object */
|
||||||
id: Scalars['ID']['output'];
|
id: Scalars['ID']['output'];
|
||||||
pk?: Maybe<Scalars['Int']['output']>;
|
pk?: Maybe<Scalars['Int']['output']>;
|
||||||
|
|
@ -986,7 +989,7 @@ export type ModuleNode = ModuleInterface & {
|
||||||
bookmark?: Maybe<ModuleBookmarkNode>;
|
bookmark?: Maybe<ModuleBookmarkNode>;
|
||||||
category?: Maybe<ModuleCategoryNode>;
|
category?: Maybe<ModuleCategoryNode>;
|
||||||
chapters?: Maybe<Array<Maybe<ChapterNode>>>;
|
chapters?: Maybe<Array<Maybe<ChapterNode>>>;
|
||||||
heroImage: WagtailImageNode;
|
heroImage?: Maybe<WagtailImageNode>;
|
||||||
/** e.g. 'Reuters', 'Wikipedia' */
|
/** e.g. 'Reuters', 'Wikipedia' */
|
||||||
heroSource: Scalars['String']['output'];
|
heroSource: Scalars['String']['output'];
|
||||||
highlights?: Maybe<Array<Maybe<HighlightNode>>>;
|
highlights?: Maybe<Array<Maybe<HighlightNode>>>;
|
||||||
|
|
@ -2850,10 +2853,10 @@ export type TeamPartsFragment = { __typename?: 'TeamNode', name: string, code?:
|
||||||
|
|
||||||
export type WagtailImagePartsFragment = { __typename?: 'WagtailImageNode', id: string, src?: string | null, alt?: string | null, width: number, height: number, title: string, srcset?: string | null } & { ' $fragmentName'?: 'WagtailImagePartsFragment' };
|
export type WagtailImagePartsFragment = { __typename?: 'WagtailImageNode', id: string, src?: string | null, alt?: string | null, width: number, height: number, title: string, srcset?: string | null } & { ' $fragmentName'?: 'WagtailImagePartsFragment' };
|
||||||
|
|
||||||
export type ModulePartsFragment = { __typename?: 'ModuleNode', id: string, title: string, metaTitle: string, teaser: string, intro: string, slug: string, heroSource: string, solutionsEnabled?: boolean | null, language?: string | null, inEditMode: boolean, heroImage: (
|
export type ModulePartsFragment = { __typename?: 'ModuleNode', id: string, title: string, metaTitle: string, teaser: string, intro: string, slug: string, heroSource: string, solutionsEnabled?: boolean | null, language?: string | null, inEditMode: boolean, heroImage?: (
|
||||||
{ __typename?: 'WagtailImageNode' }
|
{ __typename?: 'WagtailImageNode' }
|
||||||
& { ' $fragmentRefs'?: { 'WagtailImagePartsFragment': WagtailImagePartsFragment } }
|
& { ' $fragmentRefs'?: { 'WagtailImagePartsFragment': WagtailImagePartsFragment } }
|
||||||
), highlights?: Array<(
|
) | null, highlights?: Array<(
|
||||||
{ __typename?: 'HighlightNode' }
|
{ __typename?: 'HighlightNode' }
|
||||||
& { ' $fragmentRefs'?: { 'HighlightPartsFragment': HighlightPartsFragment } }
|
& { ' $fragmentRefs'?: { 'HighlightPartsFragment': HighlightPartsFragment } }
|
||||||
) | null> | null, level?: { __typename?: 'ModuleLevelNode', id: string, name: string } | null, category?: { __typename?: 'ModuleCategoryNode', id: string, name: string } | null, topic?: { __typename?: 'TopicNode', slug: string, title: string } | null, bookmark?: { __typename?: 'ModuleBookmarkNode', note?: { __typename?: 'NoteNode', id: string, text: string } | null } | null } & { ' $fragmentName'?: 'ModulePartsFragment' };
|
) | null> | null, level?: { __typename?: 'ModuleLevelNode', id: string, name: string } | null, category?: { __typename?: 'ModuleCategoryNode', id: string, name: string } | null, topic?: { __typename?: 'TopicNode', slug: string, title: string } | null, bookmark?: { __typename?: 'ModuleBookmarkNode', note?: { __typename?: 'NoteNode', id: string, text: string } | null } | null } & { ' $fragmentName'?: 'ModulePartsFragment' };
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
:original-width="module.heroImage.width"
|
:original-width="module.heroImage.width"
|
||||||
:original-height="module.heroImage.height"
|
:original-height="module.heroImage.height"
|
||||||
:alt="module.heroImage.alt"
|
:alt="module.heroImage.alt"
|
||||||
|
v-if="module.heroImage"
|
||||||
></wagtail-image>
|
></wagtail-image>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
:srcset="heroImage.srcset"
|
:srcset="heroImage.srcset"
|
||||||
:original-height="heroImage.height"
|
:original-height="heroImage.height"
|
||||||
:original-width="heroImage.width"
|
:original-width="heroImage.width"
|
||||||
|
v-if="heroImage"
|
||||||
></wagtail-image>
|
></wagtail-image>
|
||||||
<div class="module-teaser__body">
|
<div class="module-teaser__body">
|
||||||
<div class="module-teaser__content">
|
<div class="module-teaser__content">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ from graphene import relay
|
||||||
|
|
||||||
class ModuleInterface(relay.Node):
|
class ModuleInterface(relay.Node):
|
||||||
pk = graphene.Int()
|
pk = graphene.Int()
|
||||||
hero_image = graphene.Field('books.schema.nodes.WagtailImageNode', required=True)
|
hero_image = graphene.Field('books.schema.nodes.WagtailImageNode')
|
||||||
topic = graphene.Field('books.schema.nodes.TopicNode')
|
topic = graphene.Field('books.schema.nodes.TopicNode')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ type ModuleNode implements ModuleInterface {
|
||||||
metaTitle: String!
|
metaTitle: String!
|
||||||
level: ModuleLevelNode
|
level: ModuleLevelNode
|
||||||
category: ModuleCategoryNode
|
category: ModuleCategoryNode
|
||||||
heroImage: WagtailImageNode!
|
heroImage: WagtailImageNode
|
||||||
|
|
||||||
"""e.g. 'Reuters', 'Wikipedia'"""
|
"""e.g. 'Reuters', 'Wikipedia'"""
|
||||||
heroSource: String!
|
heroSource: String!
|
||||||
|
|
@ -140,7 +140,7 @@ interface ModuleInterface {
|
||||||
"""The ID of the object"""
|
"""The ID of the object"""
|
||||||
id: ID!
|
id: ID!
|
||||||
pk: Int
|
pk: Int
|
||||||
heroImage: WagtailImageNode!
|
heroImage: WagtailImageNode
|
||||||
topic: TopicNode
|
topic: TopicNode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1762,6 +1762,7 @@ enum InputTypes {
|
||||||
document_block
|
document_block
|
||||||
content_list_item
|
content_list_item
|
||||||
subtitle
|
subtitle
|
||||||
|
solution
|
||||||
readonly
|
readonly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1783,6 +1784,9 @@ input ContentElementValueInput {
|
||||||
|
|
||||||
"""To be used for assignment type"""
|
"""To be used for assignment type"""
|
||||||
id: String
|
id: String
|
||||||
|
|
||||||
|
"""To be used for assignment type"""
|
||||||
|
solution: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddModuleRoomEntryPayload {
|
type AddModuleRoomEntryPayload {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue