GraphQL - Embeds - #898
Conversation
| field :site_name, String, | ||
| description: SITE_NAME_DESCRIPTION, | ||
| null: false | ||
| end No newline at end of file |
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| @@ -0,0 +1,5 @@ | |||
| class Types::Union::EmbedItem < Types::Union::Base | |||
There was a problem hiding this comment.
Is there a good argument to using a union vs just referencing the base embed interface that all embeds inherit from?
There was a problem hiding this comment.
I'm not actually sure. I've always preferred using a union vs referencing the base embed, I think it reads nicer. But both function the same way.
There was a problem hiding this comment.
After reading this: https://artsy.github.io/blog/2019/01/14/graphql-union-vs-interface/ I think I prefer Unions.
|
|
||
| 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.
Line is too long. [102/100] (https://rubystyle.guide#80-character-limits)
| value 'MALE', value: 'male' | ||
| value 'FEMALE', value: 'female' | ||
| value 'OTHER', value: 'other' | ||
| end No newline at end of file |
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| field :gender, Types::Enum::Gender, | ||
| null: true, | ||
| description: 'Their gender.' | ||
| end No newline at end of file |
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| implements Types::Interface::BaseEmbed | ||
|
|
||
| description 'Audio Properties' | ||
| end No newline at end of file |
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| 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.' |
There was a problem hiding this comment.
I don't think we use any of these
There was a problem hiding this comment.
should we not start bringing them in? They are optional.
| @@ -0,0 +1,5 @@ | |||
| class Types::Embed::AudioTagEmbed < Types::BaseObject | |||
There was a problem hiding this comment.
seemed kind of strange just being AudioEmbed and on the docs it used tag in the description. i.e: The og:video tag has the identical tags which I kinda liked. I can rename though.
| class Types::Embed::VideoEmbed < Types::BaseObject | ||
| implements Types::Interface::BaseEmbed | ||
|
|
||
| end No newline at end of file |
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| @@ -0,0 +1,4 @@ | |||
| class Types::Embed::VideoEmbed < Types::BaseObject | |||
| implements Types::Interface::BaseEmbed | |||
|
|
|||
There was a problem hiding this comment.
Extra empty line detected at class body end. (https://rubystyle.guide#empty-lines-around-bodies)
| class Types::Embed::MusicEmbed < Types::BaseObject | ||
| implements Types::Interface::BaseEmbed | ||
|
|
||
| end No newline at end of file |
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| @@ -0,0 +1,4 @@ | |||
| class Types::Embed::MusicEmbed < Types::BaseObject | |||
| implements Types::Interface::BaseEmbed | |||
|
|
|||
There was a problem hiding this comment.
Extra empty line detected at class body end. (https://rubystyle.guide#empty-lines-around-bodies)
| @@ -0,0 +1,3 @@ | |||
| class Types::Embed::ImageEmbed < Types::BaseObject | |||
| implements Types::Interface::BaseEmbed | |||
| end No newline at end of file | |||
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| @@ -0,0 +1,3 @@ | |||
| class Types::Embed::BookEmbed < Types::BaseObject | |||
| implements Types::Interface::BaseEmbed | |||
| end No newline at end of file | |||
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
| @@ -0,0 +1,3 @@ | |||
| class Types::Embed::WebsiteEmbed < Types::BaseObject | |||
| implements Types::Interface::BaseEmbed | |||
| end No newline at end of file | |||
There was a problem hiding this comment.
Final newline missing. (https://rubystyle.guide#newline-eof)
|
Code Climate has analyzed commit 5e9c522 and detected 12 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
What
Why
Checklist