-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL - Embeds #898
base: the-future
Are you sure you want to change the base?
GraphQL - Embeds #898
Changes from all commits
34e0d65
a04db9d
9424ba9
913b1c4
7d4a713
cc45c46
9fb779b
65ef417
ef6c4c9
5e9c522
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Types::Embed::WebsiteEmbed < Types::BaseObject | ||
implements Types::Interface::BaseEmbed | ||
end | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Types::Embed::AudioTagEmbed < Types::BaseObject | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seemed kind of strange just being |
||
implements Types::Interface::BaseTagEmbed | ||
|
||
description 'Audio Properties' | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Types::Embed::BookEmbed < Types::BaseObject | ||
implements Types::Interface::BaseEmbed | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Types::Embed::ImageEmbed < Types::BaseObject | ||
implements Types::Interface::BaseEmbed | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Types::Embed::ImageTagEmbed < Types::BaseObject | ||
implements Types::Interface::BaseTagEmbed | ||
|
||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Types::Embed::MusicEmbed < Types::BaseObject | ||
implements Types::Interface::BaseEmbed | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at class body end. (https://rubystyle.guide#empty-lines-around-bodies) |
||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Types::Embed::VideoEmbed < Types::BaseObject | ||
implements Types::Interface::BaseEmbed | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at class body end. (https://rubystyle.guide#empty-lines-around-bodies) |
||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Types::Embed::VideoTagEmbed < Types::BaseObject | ||
implements Types::Interface::BaseTagEmbed | ||
|
||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Types::Embed::WebsiteEmbed < Types::BaseObject | ||
implements Types::Interface::BaseEmbed | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Types::Enum::Gender < Types::Enum::Base | ||
value 'MALE', value: 'male' | ||
value 'FEMALE', value: 'female' | ||
value 'OTHER', value: 'other' | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final newline missing. (https://rubystyle.guide#newline-eof) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 :url, String, | ||
null: false, | ||
description: 'The canonical URL of your object that will be used as its permanent ID in the graph' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [102/100] (https://rubystyle.guide#80-character-limits) |
||
|
||
field :image, Types::Embed::ImageTagEmbed, | ||
null: false, | ||
description: 'An image URL which should represent your object within the graph.' | ||
|
||
field :audio, Types::Embed::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, | ||
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], | ||
null: true, | ||
description: 'An array of other locales this page is available in.' | ||
Comment on lines
+35
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we use any of these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we not start bringing them in? They are optional. |
||
|
||
field :site, String, | ||
null: true, | ||
description: '' | ||
|
||
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::Embed::VideoTagEmbed, | ||
null: true, | ||
description: 'A URL to a video file that complements this object.' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final newline missing. (https://rubystyle.guide#newline-eof)