From 34e0d651e787e173ed67b5509062db359c6b4add Mon Sep 17 00:00:00 2001 From: toyhammered Date: Fri, 27 Nov 2020 13:46:48 -0800 Subject: [PATCH 01/10] base setup for post embeds --- .../concerns/optional_embed_description.rb | 23 +++++++++++++++ app/graphql/types/embed/website_embed.rb | 10 +++++++ app/graphql/types/interface/required_embed.rb | 28 +++++++++++++++++++ app/graphql/types/post.rb | 4 +++ app/graphql/types/union/embed_item.rb | 5 ++++ 5 files changed, 70 insertions(+) create mode 100644 app/graphql/concerns/optional_embed_description.rb create mode 100644 app/graphql/types/embed/website_embed.rb create mode 100644 app/graphql/types/interface/required_embed.rb create mode 100644 app/graphql/types/union/embed_item.rb diff --git a/app/graphql/concerns/optional_embed_description.rb b/app/graphql/concerns/optional_embed_description.rb new file mode 100644 index 0000000000..9f64dc78b0 --- /dev/null +++ b/app/graphql/concerns/optional_embed_description.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module OptionalEmbedDescription + extend ActiveSupport::Concern + + AUDIO_DESCRIPTION = 'A URL to an audio file to accompany this object.' + DESCRIPTION = 'A one to two sentence description of your object.' + DETERMINER_DESCRIPTION = %q[ + The word that appears before this object's title in a sentence. + An enum of (a, an, the, "", auto). If auto is chosen, + the consumer of your data should chose between "a" or "an". Default is "" (blank). + ] + LOCALE_DESCRIPTION = %[ + The locale these tags are marked up in. + Of the format language_TERRITORY. Default is en_US. + ] + LOCALE_ALTERNATIVE_DESCRIPTION = 'An array of other locales this page is available in.' + SITE_NAME_DESCRIPTION = %[ + If your object is part of a larger web site, + the name which should be displayed for the overall site. + ] + VIDEO_DESCRIPTION = 'A URL to a video file that complements this object.' +end diff --git a/app/graphql/types/embed/website_embed.rb b/app/graphql/types/embed/website_embed.rb new file mode 100644 index 0000000000..94747972b6 --- /dev/null +++ b/app/graphql/types/embed/website_embed.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class Types::Embed::WebsiteEmbed < Types::BaseObject + include OptionalEmbedDescription + implements Types::Interface::RequiredEmbed + + field :site_name, String, + description: SITE_NAME_DESCRIPTION, + null: false +end \ No newline at end of file diff --git a/app/graphql/types/interface/required_embed.rb b/app/graphql/types/interface/required_embed.rb new file mode 100644 index 0000000000..fb33f91407 --- /dev/null +++ b/app/graphql/types/interface/required_embed.rb @@ -0,0 +1,28 @@ +module Types::Interface::RequiredEmbed + include Types::Interface::Base + description 'Required fields for an Embed based off the Open Graph protocol' + + field :title, String, + null: true, + description: '' + + field :kind, String, + null: false, + description: '' + + field :description, String, + null: true, + description: '' + + field :site, String, + null: true, + description: '' + + field :url, String, + null: true, + description: '' + + # field :image, Types::EmbedImage, + # null: true, + # description: '' +end \ No newline at end of file diff --git a/app/graphql/types/post.rb b/app/graphql/types/post.rb index 445f5ff5e2..7adbde7d06 100644 --- a/app/graphql/types/post.rb +++ b/app/graphql/types/post.rb @@ -44,6 +44,10 @@ class Types::Post < Types::BaseObject null: true, description: 'The reason why this post was locked.' + field :embed, Types::Union::EmbedItem, + null: true, + description: '' + field :comments, Types::Comment.connection_type, null: false, description: 'All comments related to this post.' diff --git a/app/graphql/types/union/embed_item.rb b/app/graphql/types/union/embed_item.rb new file mode 100644 index 0000000000..c890d4ea0c --- /dev/null +++ b/app/graphql/types/union/embed_item.rb @@ -0,0 +1,5 @@ +class Types::Union::EmbedItem < Types::Union::Base + description 'All the different Embed types' + + possible_types Types::Embed::WebsiteEmbed +end From a04db9d6f9f880b6489b7c6a41efdc3464a73090 Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:15:20 -0800 Subject: [PATCH 02/10] change to use base embed as interface --- .../concerns/optional_embed_description.rb | 23 ------- app/graphql/types/embed/website_embed.rb | 7 +- app/graphql/types/interface/base_embed.rb | 69 +++++++++++++++++++ app/graphql/types/interface/required_embed.rb | 28 -------- app/graphql/types/post.rb | 2 +- 5 files changed, 71 insertions(+), 58 deletions(-) delete mode 100644 app/graphql/concerns/optional_embed_description.rb create mode 100644 app/graphql/types/interface/base_embed.rb delete mode 100644 app/graphql/types/interface/required_embed.rb diff --git a/app/graphql/concerns/optional_embed_description.rb b/app/graphql/concerns/optional_embed_description.rb deleted file mode 100644 index 9f64dc78b0..0000000000 --- a/app/graphql/concerns/optional_embed_description.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -module OptionalEmbedDescription - extend ActiveSupport::Concern - - AUDIO_DESCRIPTION = 'A URL to an audio file to accompany this object.' - DESCRIPTION = 'A one to two sentence description of your object.' - DETERMINER_DESCRIPTION = %q[ - The word that appears before this object's title in a sentence. - An enum of (a, an, the, "", auto). If auto is chosen, - the consumer of your data should chose between "a" or "an". Default is "" (blank). - ] - LOCALE_DESCRIPTION = %[ - The locale these tags are marked up in. - Of the format language_TERRITORY. Default is en_US. - ] - LOCALE_ALTERNATIVE_DESCRIPTION = 'An array of other locales this page is available in.' - SITE_NAME_DESCRIPTION = %[ - If your object is part of a larger web site, - the name which should be displayed for the overall site. - ] - VIDEO_DESCRIPTION = 'A URL to a video file that complements this object.' -end diff --git a/app/graphql/types/embed/website_embed.rb b/app/graphql/types/embed/website_embed.rb index 94747972b6..4abfa41dbf 100644 --- a/app/graphql/types/embed/website_embed.rb +++ b/app/graphql/types/embed/website_embed.rb @@ -1,10 +1,5 @@ # frozen_string_literal: true class Types::Embed::WebsiteEmbed < Types::BaseObject - include OptionalEmbedDescription - implements Types::Interface::RequiredEmbed - - field :site_name, String, - description: SITE_NAME_DESCRIPTION, - null: false + implements Types::Interface::BaseEmbed end \ No newline at end of file diff --git a/app/graphql/types/interface/base_embed.rb b/app/graphql/types/interface/base_embed.rb new file mode 100644 index 0000000000..35d12b29c0 --- /dev/null +++ b/app/graphql/types/interface/base_embed.rb @@ -0,0 +1,69 @@ +module Types::Interface::BaseEmbed + include Types::Interface::Base + description 'Required and Optional fields for an Embed based off the Open Graph protocol' + + orphan_types Types::Embed::WebsiteEmbed + + field :title, String, + null: false, + description: 'The title of your object as it should appear within the graph.' + + field :kind, String, + null: false, + description: <<~DESCRIPTION.squish + The type of your object, + e.g., "video.movie". + Depending on the type you specify, other properties may also be required. + DESCRIPTION + + field :site, String, + null: false, + description: '' + + field :url, String, + null: false, + description: 'The canonical URL of your object that will be used as its permanent ID in the graph' + + field :image, Types::ImageTagEmbed, + null: false, + description: 'An image URL which should represent your object within the graph.' + + field :audio, Types::AudioTagEmbed, + null: true, + description: 'A URL to an audio file to accompany this object.' + + field :description, String, + null: true, + description: 'A one to two sentence description of your object.' + + field :determiner, String, + null: true, + description: <<~DESCRIPTION.squish + The word that appears before this object's title in a sentence. + An enum of (a, an, the, "", auto). If auto is chosen, + the consumer of your data should chose between "a" or "an". Default is "" (blank). + DESCRIPTION + + field :locale, String, + null: true, + default_value: 'en_us', + description: <<~DESCRIPTION.squish + The locale these tags are marked up in. + Of the format language_territory. + DESCRIPTION + + field :locale_alternative, [String], + null: true, + description: 'An array of other locales this page is available in.' + + field :site_name, String, + null: true, + description: <<~DESCRIPTION.squish + If your object is part of a larger web site, + the name which should be displayed for the overall site. + DESCRIPTION + + field :video, Types::VideoTagEmbed, + null: true, + description: 'A URL to a video file that complements this object.' +end diff --git a/app/graphql/types/interface/required_embed.rb b/app/graphql/types/interface/required_embed.rb deleted file mode 100644 index fb33f91407..0000000000 --- a/app/graphql/types/interface/required_embed.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Types::Interface::RequiredEmbed - include Types::Interface::Base - description 'Required fields for an Embed based off the Open Graph protocol' - - field :title, String, - null: true, - description: '' - - field :kind, String, - null: false, - description: '' - - field :description, String, - null: true, - description: '' - - field :site, String, - null: true, - description: '' - - field :url, String, - null: true, - description: '' - - # field :image, Types::EmbedImage, - # null: true, - # description: '' -end \ No newline at end of file diff --git a/app/graphql/types/post.rb b/app/graphql/types/post.rb index 7adbde7d06..cfd53a3bb4 100644 --- a/app/graphql/types/post.rb +++ b/app/graphql/types/post.rb @@ -44,7 +44,7 @@ class Types::Post < Types::BaseObject null: true, description: 'The reason why this post was locked.' - field :embed, Types::Union::EmbedItem, + field :embed, Types::Interface::BaseEmbed, null: true, description: '' From 9424ba9e4f3f1ba894b222be5a7a53490f8a778d Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:37:05 -0800 Subject: [PATCH 03/10] base tag embeds --- app/graphql/types/embed/audio_tag_embed.rb | 5 +++++ app/graphql/types/embed/image_tag_embed.rb | 17 +++++++++++++++++ app/graphql/types/embed/video_tag_embed.rb | 17 +++++++++++++++++ app/graphql/types/interface/base_tag_embed.rb | 17 +++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 app/graphql/types/embed/audio_tag_embed.rb create mode 100644 app/graphql/types/embed/image_tag_embed.rb create mode 100644 app/graphql/types/embed/video_tag_embed.rb create mode 100644 app/graphql/types/interface/base_tag_embed.rb diff --git a/app/graphql/types/embed/audio_tag_embed.rb b/app/graphql/types/embed/audio_tag_embed.rb new file mode 100644 index 0000000000..3ffc20b255 --- /dev/null +++ b/app/graphql/types/embed/audio_tag_embed.rb @@ -0,0 +1,5 @@ +class Types::Embed::AudioTagEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed + + description 'Audio Properties' +end \ No newline at end of file diff --git a/app/graphql/types/embed/image_tag_embed.rb b/app/graphql/types/embed/image_tag_embed.rb new file mode 100644 index 0000000000..fb6a709596 --- /dev/null +++ b/app/graphql/types/embed/image_tag_embed.rb @@ -0,0 +1,17 @@ +class Types::Embed::ImageTagEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed + + description 'Image Properties' + + field :width, String, + null: false, + description: 'The number of pixels wide.' + + field :height, String, + null: false, + description: 'The number of pixels high.' + + field :alt, String, + null: false, + description: 'A description of what is in the image (not a caption).' +end diff --git a/app/graphql/types/embed/video_tag_embed.rb b/app/graphql/types/embed/video_tag_embed.rb new file mode 100644 index 0000000000..4f0002d0e9 --- /dev/null +++ b/app/graphql/types/embed/video_tag_embed.rb @@ -0,0 +1,17 @@ +class Types::Embed::VideoTagEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed + + description 'Video Properties' + + field :width, String, + null: false, + description: 'The number of pixels wide.' + + field :height, String, + null: false, + description: 'The number of pixels high.' + + field :alt, String, + null: false, + description: 'A description of what is in the video (not a caption).' +end diff --git a/app/graphql/types/interface/base_tag_embed.rb b/app/graphql/types/interface/base_tag_embed.rb new file mode 100644 index 0000000000..1ee754e587 --- /dev/null +++ b/app/graphql/types/interface/base_tag_embed.rb @@ -0,0 +1,17 @@ +module Types::Interface::BaseTagEmbed + include Types::Interface::Base + + description 'Similar fields between Image, Audio, Video Tags.' + + field :url, String, + null: false, + description: 'A url.' + + field :secure_url, String, + null: true, + description: 'An alternate url to use if the webpage requires HTTPS.' + + field :kind, String, + null: true, + description: 'A MIME type' +end From 913b1c4cbc82fb50d9ba830e5a4085567d427dfa Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:37:13 -0800 Subject: [PATCH 04/10] website embed --- app/graphql/types/embed/website_embed.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/graphql/types/embed/website_embed.rb b/app/graphql/types/embed/website_embed.rb index 4abfa41dbf..082f0941a2 100644 --- a/app/graphql/types/embed/website_embed.rb +++ b/app/graphql/types/embed/website_embed.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class Types::Embed::WebsiteEmbed < Types::BaseObject implements Types::Interface::BaseEmbed end \ No newline at end of file From 7d4a713f6a185a186c1e0df3db303d2975fb88be Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:37:25 -0800 Subject: [PATCH 05/10] profile embed --- app/graphql/types/embed/profile_embed.rb | 22 ++++++++++++++++++++++ app/graphql/types/enum/gender.rb | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 app/graphql/types/embed/profile_embed.rb create mode 100644 app/graphql/types/enum/gender.rb diff --git a/app/graphql/types/embed/profile_embed.rb b/app/graphql/types/embed/profile_embed.rb new file mode 100644 index 0000000000..ef27b5c86c --- /dev/null +++ b/app/graphql/types/embed/profile_embed.rb @@ -0,0 +1,22 @@ +class Types::Embed::WebsiteEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed + + field :first_name, String, + null: true, + description: 'A name normally given to an individual by a parent or self-chosen.' + + field :last_name, String, + null: true, + description: <<~DESCRIPTION.squish + A name inherited from a family or marriage + and by which the individual is commonly known. + DESCRIPTION + + field :username, String, + null: true, + description: 'A short unique string to identify them.' + + field :gender, Types::Enum::Gender, + null: true, + description: 'Their gender.' +end \ No newline at end of file diff --git a/app/graphql/types/enum/gender.rb b/app/graphql/types/enum/gender.rb new file mode 100644 index 0000000000..fe885b7a11 --- /dev/null +++ b/app/graphql/types/enum/gender.rb @@ -0,0 +1,5 @@ +class Types::Enum::Gender < Types::Enum::Base + value 'MALE', value: 'male' + value 'FEMALE', value: 'female' + value 'OTHER', value: 'other' +end \ No newline at end of file From cc45c46ca5ba1c4839b7c7fcf12977c5550cec17 Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:41:33 -0800 Subject: [PATCH 06/10] fix base embed tag pathings --- app/graphql/types/interface/base_embed.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/graphql/types/interface/base_embed.rb b/app/graphql/types/interface/base_embed.rb index 35d12b29c0..1be97ca35e 100644 --- a/app/graphql/types/interface/base_embed.rb +++ b/app/graphql/types/interface/base_embed.rb @@ -24,11 +24,11 @@ module Types::Interface::BaseEmbed null: false, description: 'The canonical URL of your object that will be used as its permanent ID in the graph' - field :image, Types::ImageTagEmbed, + field :image, Types::Embed::ImageTagEmbed, null: false, description: 'An image URL which should represent your object within the graph.' - field :audio, Types::AudioTagEmbed, + field :audio, Types::Embed::AudioTagEmbed, null: true, description: 'A URL to an audio file to accompany this object.' @@ -46,10 +46,10 @@ module Types::Interface::BaseEmbed field :locale, String, null: true, - default_value: 'en_us', description: <<~DESCRIPTION.squish The locale these tags are marked up in. Of the format language_territory. + Default is en_us. DESCRIPTION field :locale_alternative, [String], @@ -63,7 +63,7 @@ module Types::Interface::BaseEmbed the name which should be displayed for the overall site. DESCRIPTION - field :video, Types::VideoTagEmbed, + field :video, Types::Embed::VideoTagEmbed, null: true, description: 'A URL to a video file that complements this object.' end From 9fb779b622fb325e19901234e13a8831838b0fd8 Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:44:04 -0800 Subject: [PATCH 07/10] remove embed union in favor of interface --- app/graphql/types/union/embed_item.rb | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 app/graphql/types/union/embed_item.rb diff --git a/app/graphql/types/union/embed_item.rb b/app/graphql/types/union/embed_item.rb deleted file mode 100644 index c890d4ea0c..0000000000 --- a/app/graphql/types/union/embed_item.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Types::Union::EmbedItem < Types::Union::Base - description 'All the different Embed types' - - possible_types Types::Embed::WebsiteEmbed -end From 65ef41735492abeeaa972e52f6dbadcd52d91090 Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 11:44:43 -0800 Subject: [PATCH 08/10] implement correct embed interface --- app/graphql/types/embed/audio_tag_embed.rb | 2 +- app/graphql/types/embed/image_tag_embed.rb | 2 +- app/graphql/types/embed/video_tag_embed.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/graphql/types/embed/audio_tag_embed.rb b/app/graphql/types/embed/audio_tag_embed.rb index 3ffc20b255..dad8474f09 100644 --- a/app/graphql/types/embed/audio_tag_embed.rb +++ b/app/graphql/types/embed/audio_tag_embed.rb @@ -1,5 +1,5 @@ class Types::Embed::AudioTagEmbed < Types::BaseObject - implements Types::Interface::BaseEmbed + implements Types::Interface::BaseTagEmbed description 'Audio Properties' end \ No newline at end of file diff --git a/app/graphql/types/embed/image_tag_embed.rb b/app/graphql/types/embed/image_tag_embed.rb index fb6a709596..a40e0aadfa 100644 --- a/app/graphql/types/embed/image_tag_embed.rb +++ b/app/graphql/types/embed/image_tag_embed.rb @@ -1,5 +1,5 @@ class Types::Embed::ImageTagEmbed < Types::BaseObject - implements Types::Interface::BaseEmbed + implements Types::Interface::BaseTagEmbed description 'Image Properties' diff --git a/app/graphql/types/embed/video_tag_embed.rb b/app/graphql/types/embed/video_tag_embed.rb index 4f0002d0e9..554e30daeb 100644 --- a/app/graphql/types/embed/video_tag_embed.rb +++ b/app/graphql/types/embed/video_tag_embed.rb @@ -1,5 +1,5 @@ class Types::Embed::VideoTagEmbed < Types::BaseObject - implements Types::Interface::BaseEmbed + implements Types::Interface::BaseTagEmbed description 'Video Properties' From ef6c4c978a03f3bb162fecf34c1cd849bfa53a76 Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sat, 28 Nov 2020 13:30:07 -0800 Subject: [PATCH 09/10] more renaming stuff --- .../types/interface/{base_tag_embed.rb => base_media_embed.rb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename app/graphql/types/interface/{base_tag_embed.rb => base_media_embed.rb} (90%) diff --git a/app/graphql/types/interface/base_tag_embed.rb b/app/graphql/types/interface/base_media_embed.rb similarity index 90% rename from app/graphql/types/interface/base_tag_embed.rb rename to app/graphql/types/interface/base_media_embed.rb index 1ee754e587..f92c645181 100644 --- a/app/graphql/types/interface/base_tag_embed.rb +++ b/app/graphql/types/interface/base_media_embed.rb @@ -1,4 +1,4 @@ -module Types::Interface::BaseTagEmbed +module Types::Interface::BaseMediaEmbed include Types::Interface::Base description 'Similar fields between Image, Audio, Video Tags.' From 5e9c522a5480ee9f53f459f3471f9f1255409463 Mon Sep 17 00:00:00 2001 From: toyhammered Date: Sun, 29 Nov 2020 10:21:13 -0800 Subject: [PATCH 10/10] additional embeds --- app/graphql/types/embed/article_embed.rb | 3 +++ app/graphql/types/embed/book_embed.rb | 3 +++ app/graphql/types/embed/image_embed.rb | 3 +++ app/graphql/types/embed/music_embed.rb | 4 ++++ app/graphql/types/embed/video_embed.rb | 4 ++++ app/graphql/types/interface/base_embed.rb | 8 ++++---- .../interface/{base_media_embed.rb => base_tag_embed.rb} | 2 +- 7 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 app/graphql/types/embed/article_embed.rb create mode 100644 app/graphql/types/embed/book_embed.rb create mode 100644 app/graphql/types/embed/image_embed.rb create mode 100644 app/graphql/types/embed/music_embed.rb create mode 100644 app/graphql/types/embed/video_embed.rb rename app/graphql/types/interface/{base_media_embed.rb => base_tag_embed.rb} (90%) diff --git a/app/graphql/types/embed/article_embed.rb b/app/graphql/types/embed/article_embed.rb new file mode 100644 index 0000000000..082f0941a2 --- /dev/null +++ b/app/graphql/types/embed/article_embed.rb @@ -0,0 +1,3 @@ +class Types::Embed::WebsiteEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed +end \ No newline at end of file diff --git a/app/graphql/types/embed/book_embed.rb b/app/graphql/types/embed/book_embed.rb new file mode 100644 index 0000000000..9ed4946cdc --- /dev/null +++ b/app/graphql/types/embed/book_embed.rb @@ -0,0 +1,3 @@ +class Types::Embed::BookEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed +end \ No newline at end of file diff --git a/app/graphql/types/embed/image_embed.rb b/app/graphql/types/embed/image_embed.rb new file mode 100644 index 0000000000..177bff0a1f --- /dev/null +++ b/app/graphql/types/embed/image_embed.rb @@ -0,0 +1,3 @@ +class Types::Embed::ImageEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed +end \ No newline at end of file diff --git a/app/graphql/types/embed/music_embed.rb b/app/graphql/types/embed/music_embed.rb new file mode 100644 index 0000000000..32a5188587 --- /dev/null +++ b/app/graphql/types/embed/music_embed.rb @@ -0,0 +1,4 @@ +class Types::Embed::MusicEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed + +end \ No newline at end of file diff --git a/app/graphql/types/embed/video_embed.rb b/app/graphql/types/embed/video_embed.rb new file mode 100644 index 0000000000..d1e9cd7463 --- /dev/null +++ b/app/graphql/types/embed/video_embed.rb @@ -0,0 +1,4 @@ +class Types::Embed::VideoEmbed < Types::BaseObject + implements Types::Interface::BaseEmbed + +end \ No newline at end of file diff --git a/app/graphql/types/interface/base_embed.rb b/app/graphql/types/interface/base_embed.rb index 1be97ca35e..c9c8eaab87 100644 --- a/app/graphql/types/interface/base_embed.rb +++ b/app/graphql/types/interface/base_embed.rb @@ -16,10 +16,6 @@ module Types::Interface::BaseEmbed Depending on the type you specify, other properties may also be required. DESCRIPTION - field :site, String, - null: false, - description: '' - field :url, String, null: false, description: 'The canonical URL of your object that will be used as its permanent ID in the graph' @@ -56,6 +52,10 @@ module Types::Interface::BaseEmbed null: true, description: 'An array of other locales this page is available in.' + field :site, String, + null: true, + description: '' + field :site_name, String, null: true, description: <<~DESCRIPTION.squish diff --git a/app/graphql/types/interface/base_media_embed.rb b/app/graphql/types/interface/base_tag_embed.rb similarity index 90% rename from app/graphql/types/interface/base_media_embed.rb rename to app/graphql/types/interface/base_tag_embed.rb index f92c645181..1ee754e587 100644 --- a/app/graphql/types/interface/base_media_embed.rb +++ b/app/graphql/types/interface/base_tag_embed.rb @@ -1,4 +1,4 @@ -module Types::Interface::BaseMediaEmbed +module Types::Interface::BaseTagEmbed include Types::Interface::Base description 'Similar fields between Image, Audio, Video Tags.'