source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/enum/library_entry_status.rb | Ruby | apache-2.0 | 187 | the-future | 513 | class Types::Enum::LibraryEntryStatus < Types::Enum::Base
value 'CURRENT', 'The user is currently reading or watching this media.', value: 'current'
value 'PLANNED', 'The user plans to read or watch this media in future.', value: 'planned'
value 'COMPLETED', 'The user completed this media.', value: 'completed'
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/enum/wiki_submission_status.rb | Ruby | apache-2.0 | 187 | the-future | 224 | class Types::Enum::WikiSubmissionStatus < Types::Enum::Base
value 'DRAFT', '', value: 'draft'
value 'PENDING', '', value: 'pending'
value 'APPROVED', '', value: 'approved'
value 'REJECTED', '', value: 'rejected'
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/enum/release_status.rb | Ruby | apache-2.0 | 187 | the-future | 421 | class Types::Enum::ReleaseStatus < Types::Enum::Base
value 'TBA', 'The release date has not been announced yet', value: :tba
value 'FINISHED', 'This media is no longer releasing', value: :finished
value 'CURRENT', 'This media is currently releasing', value: :current
value 'UPCOMING', 'This media is releasing so... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/errors/not_authorized.rb | Ruby | apache-2.0 | 187 | the-future | 657 | # frozen_string_literal: true
class Types::Errors::NotAuthorized < Types::Errors::Base
description <<-DESC.squish
The mutation requires higher permissions than the current user or token has. This is a bit
vague, but it generally means you're attempting to modify an object you don't own, or perform
an adm... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/errors/warnings_present.rb | Ruby | apache-2.0 | 187 | the-future | 271 | # frozen_string_literal: true
class Types::Errors::WarningsPresent < Types::Errors::Base
description <<~DESCRIPTION.squish
Returned when a warning is present in the response from a mutation but the input did not specify
ignore_warnings: true
DESCRIPTION
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/errors/validation.rb | Ruby | apache-2.0 | 187 | the-future | 989 | # frozen_string_literal: true
class Types::Errors::Validation < Types::Errors::Base
description <<-DESC.squish
The mutation failed validation. This is usually because the input provided was invalid in some
way, such as a missing required field or an invalid value for a field. There may be multiple of
thi... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/errors/not_authenticated.rb | Ruby | apache-2.0 | 187 | the-future | 600 | # frozen_string_literal: true
class Types::Errors::NotAuthenticated < Types::Errors::Base
description <<-DESC.squish
The mutation requires an authenticated logged-in user session, and none was provided or the
session has expired. The recommended action varies depending on your application and whether you
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/errors/not_found.rb | Ruby | apache-2.0 | 187 | the-future | 430 | # frozen_string_literal: true
class Types::Errors::NotFound < Types::Errors::Base
description <<-DESC.squish
An object required for your mutation was unable to be located. Usually this means the object
you're attempting to modify or delete does not exist. The recommended action is to display a
message to... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/errors/base.rb | Ruby | apache-2.0 | 187 | the-future | 351 | # frozen_string_literal: true
class Types::Errors::Base < Types::BaseObject
implements Types::Interface::Error
def self.exception(object = {})
FancyMutation::ErrorWrapper.new(build(**object))
end
def self.build(**object)
{ __type: self, **object }
end
def self.default_graphql_name
"#{name.sp... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/base.rb | Ruby | apache-2.0 | 187 | the-future | 523 | # frozen_string_literal: true
class Types::Input::Base < GraphQL::Schema::InputObject
include ApolloFederation::InputObject
argument_class Types::BaseArgument
# These need to be unique, so I am forcible doing that.
# I am thou, and thou art I, but you will always be an input!
def self.default_graphql_name
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/titles_list.rb | Ruby | apache-2.0 | 187 | the-future | 260 | class Types::Input::TitlesList < Types::Input::Base
argument :canonical, String, required: false
argument :localized, Types::Map, required: false
argument :alternatives, [String], required: false
argument :canonical_locale, String, required: false
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/manga/create.rb | Ruby | apache-2.0 | 187 | the-future | 1,164 | class Types::Input::Manga::Create < Types::Input::Base
argument :titles, Types::Input::TitlesList, required: true
argument :description, Types::Map, required: true
argument :subtype, Types::Enum::MangaSubtype, required: true
argument :age_rating, Types::Enum::AgeRating, required: false
argument :age_rating_g... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/manga/update.rb | Ruby | apache-2.0 | 187 | the-future | 1,285 | class Types::Input::Manga::Update < Types::Input::Base
argument :id, ID, required: true
argument :titles, Types::Input::TitlesList, required: false
argument :description, Types::Map, required: false
argument :subtype, Types::Enum::MangaSubtype, required: false
argument :age_rating, Types::Enum::AgeRating, re... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/mapping/create.rb | Ruby | apache-2.0 | 187 | the-future | 398 | class Types::Input::Mapping::Create < Types::Input::Base
argument :external_site, Types::Enum::MappingExternalSite, required: true
argument :external_id, ID, required: true
# NOTE: waiting for Union Inputs to be allowed.
# argument :item, Types::Union::MappingItem, required: true
argument :item_id, ID, requi... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/mapping/update.rb | Ruby | apache-2.0 | 187 | the-future | 325 | class Types::Input::Mapping::Update < Types::Input::Base
argument :id, ID, required: true
argument :external_site, Types::Enum::MappingExternalSite, required: false
argument :external_id, ID, required: false
argument :item_id, ID, required: false
argument :item_type, Types::Enum::MappingItem, required: false... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/library_entry/update_status_by_media.rb | Ruby | apache-2.0 | 187 | the-future | 251 | class Types::Input::LibraryEntry::UpdateStatusByMedia < Types::Input::Base
argument :media_id, ID, required: true
argument :media_type, Types::Enum::MediaType, required: true
argument :status, Types::Enum::LibraryEntryStatus, required: true
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/library_entry/create.rb | Ruby | apache-2.0 | 187 | the-future | 889 | class Types::Input::LibraryEntry::Create < Types::Input::Base
argument :media_id, ID, required: true
argument :media_type, Types::Enum::MediaType, required: true
argument :status, Types::Enum::LibraryEntryStatus, required: true
argument :progress, Integer, required: false, default_value: 0
argument :private,... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/library_entry/update_progress_by_media.rb | Ruby | apache-2.0 | 187 | the-future | 231 | class Types::Input::LibraryEntry::UpdateProgressByMedia < Types::Input::Base
argument :media_id, ID, required: true
argument :media_type, Types::Enum::MediaType, required: true
argument :progress, Integer, required: true
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/library_entry/update_rating_by_media.rb | Ruby | apache-2.0 | 187 | the-future | 275 | class Types::Input::LibraryEntry::UpdateRatingByMedia < Types::Input::Base
argument :media_id, ID, required: true
argument :media_type, Types::Enum::MediaType, required: true
argument :rating, Integer,
required: true,
description: 'A number between 2 - 20'
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/library_entry/update_rating_by_id.rb | Ruby | apache-2.0 | 187 | the-future | 203 | class Types::Input::LibraryEntry::UpdateRatingById < Types::Input::Base
argument :id, ID, required: true
argument :rating, Integer,
required: true,
description: 'A number between 2 - 20'
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/library_entry/update.rb | Ruby | apache-2.0 | 187 | the-future | 655 | class Types::Input::LibraryEntry::Update < Types::Input::Base
argument :id, ID, required: true
argument :status, Types::Enum::LibraryEntryStatus, required: false
argument :progress, Integer, required: false
argument :private, Boolean, required: false
argument :notes, String, required: false
argument :recon... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/anime/update.rb | Ruby | apache-2.0 | 187 | the-future | 1,227 | class Types::Input::Anime::Update < Types::Input::Base
argument :id, ID, required: true
argument :titles, Types::Input::TitlesList, required: false
argument :description, Types::Map, required: false
argument :age_rating, Types::Enum::AgeRating, required: false
argument :age_rating_guide, String, required: fa... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/anime/create.rb | Ruby | apache-2.0 | 187 | the-future | 1,134 | class Types::Input::Anime::Create < Types::Input::Base
argument :titles, Types::Input::TitlesList, required: true
argument :description, Types::Map, required: true
argument :age_rating, Types::Enum::AgeRating, required: false
argument :age_rating_guide, String, required: false
argument :tba, String, required:... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/episode/create.rb | Ruby | apache-2.0 | 187 | the-future | 757 | class Types::Input::Episode::Create < Types::Input::Base
argument :media_id, ID, required: true
argument :media_type, Types::Enum::MediaType, required: true
argument :titles, Types::Input::TitlesList, required: true
argument :number, Integer, required: true
argument :description, Types::Map, required: false
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/episode/update.rb | Ruby | apache-2.0 | 187 | the-future | 742 | class Types::Input::Episode::Update < Types::Input::Base
argument :id, ID, required: true
argument :titles, Types::Input::TitlesList, required: false
argument :number, Integer, required: false
argument :description, Types::Map, required: false
argument :length, Integer, required: false
argument :released_a... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/post/create.rb | Ruby | apache-2.0 | 187 | the-future | 648 | class Types::Input::Post::Create < Types::Input::Base
argument :content, String, required: true
# argument :content_formatted, String, required: true
argument :media_id, ID, required: false
argument :media_type, Types::Enum::MediaType, required: false
argument :is_spoiler, Boolean, required: false, default_va... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/post/lock.rb | Ruby | apache-2.0 | 187 | the-future | 251 | class Types::Input::Post::Lock < Types::Input::Base
argument :id, ID, required: true
argument :locked_reason, Types::Enum::LockedReason, required: true
def to_model
to_h.merge(locked_at: DateTime.current, locked_by: current_user)
end
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/wiki_submission/submit_draft.rb | Ruby | apache-2.0 | 187 | the-future | 304 | class Types::Input::WikiSubmission::SubmitDraft < Types::Input::Base
argument :id, ID, required: true
argument :data, GraphQL::Types::JSON, required: true
argument :title, String, required: false
argument :notes, String, required: false
def to_model
to_h.merge(status: :pending)
end
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/wiki_submission/update_draft.rb | Ruby | apache-2.0 | 187 | the-future | 259 | class Types::Input::WikiSubmission::UpdateDraft < Types::Input::Base
argument :id, ID, required: true
argument :data, GraphQL::Types::JSON, required: true
argument :notes, String, required: false
def to_model
to_h.merge(status: :draft)
end
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/input/wiki_submission/create_draft.rb | Ruby | apache-2.0 | 187 | the-future | 287 | class Types::Input::WikiSubmission::CreateDraft < Types::Input::Base
argument :data, GraphQL::Types::JSON, required: true
argument :title, String, required: false
argument :notes, String, required: false
def to_model
to_h.merge(status: :draft, user: current_user)
end
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/unit.rb | Ruby | apache-2.0 | 187 | the-future | 706 | # frozen_string_literal: true
module Types::Interface::Unit
include Types::Interface::Base
description 'Media units such as episodes or chapters'
field :id, ID, null: false
field :titles, Types::TitlesList,
null: false,
description: 'The titles for this unit in various locales'
def titles
{
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/error.rb | Ruby | apache-2.0 | 187 | the-future | 598 | # frozen_string_literal: true
module Types::Interface::Error
include Types::Interface::Base
description 'Generic error fields used by all errors.'
orphan_types Types::Errors::Generic
field :message, String,
null: false,
description: 'A description of the error'
def message
message_key = self.c... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/episodic.rb | Ruby | apache-2.0 | 187 | the-future | 1,084 | module Types::Interface::Episodic
include Types::Interface::Base
description 'An episodic media in the Kitsu database'
field :episode_count, Integer,
null: true,
description: 'The number of episodes in this series'
field :episode_length, Integer,
null: true,
description: 'The general length (i... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/media.rb | Ruby | apache-2.0 | 187 | the-future | 7,408 | # frozen_string_literal: true
module Types::Interface::Media
include Types::Interface::Base
orphan_types Types::Manga, Types::Anime
description 'A media in the Kitsu database'
# Identifiers
field :id, ID, null: false
field :slug, String,
null: false,
description: 'The URL-friendly identifier of ... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/holdable.rb | Ruby | apache-2.0 | 187 | the-future | 306 | # frozen_string_literal: true
module Types::Interface::Holdable
include Types::Interface::Base
description 'User-generated content which can be held for moderation'
field :held_reason, Types::Enum::HeldReason,
null: true,
description: 'The reason this content was held for moderation'
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/streamable.rb | Ruby | apache-2.0 | 187 | the-future | 664 | module Types::Interface::Streamable
include Types::Interface::Base
description 'Media that is streamable.'
field :streamer, Types::Streamer,
null: false,
description: 'The site that is streaming this media.'
def streamer
Loaders::RecordLoader.for(Streamer).load(object.streamer_id)
end
field :... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/base.rb | Ruby | apache-2.0 | 187 | the-future | 228 | # frozen_string_literal: true
module Types::Interface::Base
extend ActiveSupport::Concern
include GraphQL::Schema::Interface
include HasImageField
include ApolloFederation::Interface
field_class Types::BaseField
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/with_timestamps.rb | Ruby | apache-2.0 | 187 | the-future | 210 | module Types::Interface::WithTimestamps
include Types::Interface::Base
field :created_at, GraphQL::Types::ISO8601DateTime, null: false
field :updated_at, GraphQL::Types::ISO8601DateTime, null: false
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/profile_stats/amount_consumed.rb | Ruby | apache-2.0 | 187 | the-future | 616 | module Types::Interface::ProfileStats::AmountConsumed
include Types::Interface::ProfileStats::Base
description 'Generic Amount Consumed based on Media'
field :media, Integer,
null: false,
description: 'Total amount of media.'
def media
object.stats_data['media']
end
field :units, Integer,
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/profile_stats/base.rb | Ruby | apache-2.0 | 187 | the-future | 427 | module Types::Interface::ProfileStats::Base
include Types::Interface::Base
description 'The basic stat information.'
field :id, ID, null: false
field :profile, Types::Profile,
null: false,
description: 'The profile related to the user for this stat.',
method: :user
field :recalculated_at, Graph... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/interface/profile_stats/category_breakdown.rb | Ruby | apache-2.0 | 187 | the-future | 585 | module Types::Interface::ProfileStats::CategoryBreakdown
include Types::Interface::ProfileStats::Base
description 'Generic Category Breakdown based on Media'
field :total, Integer,
null: false,
description: 'The total amount of library entries.'
def total
object.stats_data['total']
end
field ... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/types/profile_stats/anime_amount_consumed.rb | Ruby | apache-2.0 | 187 | the-future | 269 | class Types::ProfileStats::AnimeAmountConsumed < Types::BaseObject
implements Types::Interface::ProfileStats::AmountConsumed
field :time, Integer,
null: false,
description: 'Total time spent in minutes.'
def time
object.stats_data['time']
end
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/media_reaction.rb | Ruby | apache-2.0 | 187 | the-future | 385 | # frozen_string_literal: true
class Mutations::MediaReaction < Mutations::Namespace
field :like, mutation: Mutations::MediaReaction::Like
field :unlike, mutation: Mutations::MediaReaction::Unlike
field :create, mutation: Mutations::MediaReaction::Create
field :delete, mutation: Mutations::MediaReaction::Delete... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/base.rb | Ruby | apache-2.0 | 187 | the-future | 470 | # frozen_string_literal: true
class Mutations::Base < GraphQL::Schema::Mutation
include BehindFeatureFlag
field_class Types::BaseField
argument_class Types::BaseArgument
def current_user
context[:user]
end
def current_token
context[:token]
end
def self.default_graphql_name
# Mutations::... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/namespace.rb | Ruby | apache-2.0 | 187 | the-future | 366 | class Mutations::Namespace < Types::BaseObject
def self.default_graphql_name
"#{name.split('::')[1..-1].join}Mutations"
end
# HACK: The GraphQL runtime gets confused by the nil objects in mutations. So we override the
# object method to just return a hash with all fields being hashes.
def object
Hash... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/comment.rb | Ruby | apache-2.0 | 187 | the-future | 398 | # frozen_string_literal: true
class Mutations::Comment < Mutations::Namespace
field :create,
mutation: Mutations::Comment::Create,
description: 'Create a Comment.'
field :delete,
mutation: Mutations::Comment::Delete,
description: 'Delete a Comment.'
field :unhold,
mutation: Mutations::Comme... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/episode.rb | Ruby | apache-2.0 | 187 | the-future | 345 | class Mutations::Episode < Mutations::Namespace
field :create,
mutation: Mutations::Episode::Create,
description: 'Create an Episode.'
field :update,
mutation: Mutations::Episode::Update,
description: 'Update an Episode.'
field :delete,
mutation: Mutations::Episode::Delete,
description: ... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/anime.rb | Ruby | apache-2.0 | 187 | the-future | 331 | class Mutations::Anime < Mutations::Namespace
field :create,
mutation: Mutations::Anime::Create,
description: 'Create an Anime.'
field :update,
mutation: Mutations::Anime::Update,
description: 'Update an Anime.'
field :delete,
mutation: Mutations::Anime::Delete,
description: 'Delete an A... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/post.rb | Ruby | apache-2.0 | 187 | the-future | 553 | # frozen_string_literal: true
class Mutations::Post < Mutations::Namespace
field :lock,
mutation: Mutations::Post::Lock,
description: 'Lock a Post.'
field :unlock,
mutation: Mutations::Post::Unlock,
description: 'Unlock a Post.'
field :create,
mutation: Mutations::Post::Create,
descript... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/favorite.rb | Ruby | apache-2.0 | 187 | the-future | 256 | class Mutations::Favorite < Mutations::Namespace
field :create,
mutation: Mutations::Favorite::Create,
description: 'Add a favorite entry'
field :delete,
mutation: Mutations::Favorite::Delete,
description: 'Delete a favorite entry'
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/account.rb | Ruby | apache-2.0 | 187 | the-future | 404 | # frozen_string_literal: true
class Mutations::Account < Mutations::Namespace
field :send_password_reset,
mutation: Mutations::Account::SendPasswordReset,
description: 'Send a password reset email'
field :update,
mutation: Mutations::Account::Update,
description: 'Update the account of the current... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/block.rb | Ruby | apache-2.0 | 187 | the-future | 247 | class Mutations::Block < Mutations::Namespace
field :create,
mutation: Mutations::Block::Create,
description: 'Create a Block entry.'
field :delete,
mutation: Mutations::Block::Delete,
description: 'Delete a Block entry.'
end |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/pro.rb | Ruby | apache-2.0 | 187 | the-future | 578 | class Mutations::Pro < Mutations::Namespace
# Subscription Management
field :subscribe_with_stripe,
mutation: Mutations::Pro::SubscribeWithStripe,
description: 'Subscribe to Pro using Stripe'
field :unsubscribe,
mutation: Mutations::Pro::Unsubscribe,
description: "End the user's pro subscription"
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry.rb | Ruby | apache-2.0 | 187 | the-future | 1,262 | class Mutations::LibraryEntry < Mutations::Namespace
field :create,
mutation: Mutations::LibraryEntry::Create,
description: 'Create a library entry'
field :update,
mutation: Mutations::LibraryEntry::Update,
description: 'Update a library entry'
field :update_status_by_id,
mutation: Mutations... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/wiki_submission.rb | Ruby | apache-2.0 | 187 | the-future | 442 | class Mutations::WikiSubmission < Mutations::Namespace
field :create_draft,
mutation: Mutations::WikiSubmission::CreateDraft,
description: 'Create a wiki submission draft'
field :update_draft,
mutation: Mutations::WikiSubmission::UpdateDraft,
description: 'Update a wiki submission draft'
field :... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/profile_link.rb | Ruby | apache-2.0 | 187 | the-future | 368 | class Mutations::ProfileLink < Mutations::Namespace
field :create,
mutation: Mutations::ProfileLink::Create,
description: 'Add a profile link.'
field :update,
mutation: Mutations::ProfileLink::Update,
description: 'Update a profile link.'
field :delete,
mutation: Mutations::ProfileLink::Delete... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/mapping.rb | Ruby | apache-2.0 | 187 | the-future | 339 | class Mutations::Mapping < Mutations::Namespace
field :create,
mutation: Mutations::Mapping::Create,
description: 'Create a Mapping'
field :update,
mutation: Mutations::Mapping::Update,
description: 'Update a Mapping'
field :delete,
mutation: Mutations::Mapping::Delete,
description: 'Del... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/pro/set_message.rb | Ruby | apache-2.0 | 187 | the-future | 575 | class Mutations::Pro::SetMessage < Mutations::Base
argument :message, String,
required: true,
description: 'The message to set for your Hall of Fame entry'
field :message, String, null: false
def ready?
# Check that we're logged in
raise GraphQL::ExecutionError, ErrorI18n.t(NotLoggedInError) if ... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/pro/set_discord.rb | Ruby | apache-2.0 | 187 | the-future | 557 | class Mutations::Pro::SetDiscord < Mutations::Base
argument :discord, String,
required: true,
description: 'Your discord tag (Name#1234)'
field :discord, String, null: false
def ready?
# Check that we're logged in
raise GraphQL::ExecutionError, ErrorI18n.t(NotLoggedInError) if user.blank?
t... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/pro/unsubscribe.rb | Ruby | apache-2.0 | 187 | the-future | 465 | class Mutations::Pro::Unsubscribe < Mutations::Base
field :expires_at, GraphQL::Types::ISO8601DateTime, null: true
def ready?
raise GraphQL::ExecutionError, 'Must be logged in' if user.blank?
true
end
def resolve(reason: nil)
Pro::Unsubscribe.call(
user: context[:user],
reason: reason... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/pro/subscribe_with_stripe.rb | Ruby | apache-2.0 | 187 | the-future | 727 | class Mutations::Pro::SubscribeWithStripe < Mutations::Base
behind_feature_flag :pro_subscriptions
argument :tier, Types::Enum::ProTier,
required: true,
description: 'The tier to subscribe to'
argument :token, String,
required: true,
description: 'The payment method token provided by Stripe.js'
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update_progress_by_id.rb | Ruby | apache-2.0 | 187 | the-future | 872 | class Mutations::LibraryEntry::UpdateProgressById < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::UpdateProgressById,
required: true,
description: 'Update library entry progress by id',
as: :library_entry
field :library_entry, Types::LibraryEntry, nu... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update_progress_by_media.rb | Ruby | apache-2.0 | 187 | the-future | 981 | class Mutations::LibraryEntry::UpdateProgressByMedia < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::UpdateProgressByMedia,
required: true,
description: 'Update library entry progress by media',
as: :library_entry
field :library_entry, Types::Library... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/delete.rb | Ruby | apache-2.0 | 187 | the-future | 758 | class Mutations::LibraryEntry::Delete < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::GenericDelete,
required: true,
description: 'Delete Library Entry',
as: :library_entry
field :library_entry, Types::GenericDelete, null: true
field :errors, [Types::Interface::... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/create.rb | Ruby | apache-2.0 | 187 | the-future | 756 | class Mutations::LibraryEntry::Create < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::Create,
required: true,
description: 'Create a Library Entry',
as: :library_entry
field :library_entry, Types::LibraryEntry, null: true
field :errors, [Types::Int... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update.rb | Ruby | apache-2.0 | 187 | the-future | 1,197 | class Mutations::LibraryEntry::Update < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::Update,
required: true,
description: 'Update Library Entry',
as: :library_entry
field :library_entry, Types::LibraryEntry, null: true
field :errors, [Types::Inter... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update_status_by_media.rb | Ruby | apache-2.0 | 187 | the-future | 975 | class Mutations::LibraryEntry::UpdateStatusByMedia < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::UpdateStatusByMedia,
required: true,
description: 'Update library entry status by media',
as: :library_entry
field :library_entry, Types::LibraryEntry,... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update_rating_by_media.rb | Ruby | apache-2.0 | 187 | the-future | 975 | class Mutations::LibraryEntry::UpdateRatingByMedia < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::UpdateRatingByMedia,
required: true,
description: 'Update library entry rating by media',
as: :library_entry
field :library_entry, Types::LibraryEntry,... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update_status_by_id.rb | Ruby | apache-2.0 | 187 | the-future | 866 | class Mutations::LibraryEntry::UpdateStatusById < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::UpdateStatusById,
required: true,
description: 'Update library entry status by id',
as: :library_entry
field :library_entry, Types::LibraryEntry, null: tr... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/library_entry/update_rating_by_id.rb | Ruby | apache-2.0 | 187 | the-future | 866 | class Mutations::LibraryEntry::UpdateRatingById < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::LibraryEntry::UpdateRatingById,
required: true,
description: 'Update library entry rating by id',
as: :library_entry
field :library_entry, Types::LibraryEntry, null: tr... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/anime/update.rb | Ruby | apache-2.0 | 187 | the-future | 555 | class Mutations::Anime::Update < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Anime::Update,
required: true,
description: 'Update an Anime.',
as: :anime
field :anime, Types::Anime, null: true
field :errors, [Types::Interface::Error], null: true
def load_anim... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/anime/delete.rb | Ruby | apache-2.0 | 187 | the-future | 516 | class Mutations::Anime::Delete < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::GenericDelete,
required: true,
description: 'Delete an Anime.',
as: :anime
field :anime, Types::GenericDelete, null: true
field :errors, [Types::Interface::Error], null: true
def l... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/anime/create.rb | Ruby | apache-2.0 | 187 | the-future | 498 | class Mutations::Anime::Create < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Anime::Create,
required: true,
description: 'Create an Anime.',
as: :anime
field :anime, Types::Anime, null: true
field :errors, [Types::Interface::Error], null: true
def load_anim... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/media_reaction/like.rb | Ruby | apache-2.0 | 187 | the-future | 861 | # frozen_string_literal: true
class Mutations::MediaReaction::Like < Mutations::Base
include RateLimitedMutation
include FancyMutation
description 'Like a media reaction'
rate_limit do
limit 60, per: 1.hour
end
input do
argument :media_reaction_id, ID,
required: true,
description: 'T... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/media_reaction/delete.rb | Ruby | apache-2.0 | 187 | the-future | 702 | # frozen_string_literal: true
class Mutations::MediaReaction::Delete < Mutations::Base
include FancyMutation
description 'Delete a mutation'
input do
argument :media_reaction_id, ID,
required: true,
description: 'The reaction to delete'
end
result Types::MediaReaction
errors Types::Errors... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/media_reaction/create.rb | Ruby | apache-2.0 | 187 | the-future | 1,378 | # frozen_string_literal: true
class Mutations::MediaReaction::Create < Mutations::Base
include FancyMutation
description 'Share a brief reaction to a media, tied to your library entry'
input do
argument :library_entry_id, ID,
required: true,
description: 'The ID of the entry in your library to ... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/media_reaction/unhold.rb | Ruby | apache-2.0 | 187 | the-future | 760 | # frozen_string_literal: true
class Mutations::MediaReaction::Unhold < Mutations::Base
include FancyMutation
directive Directives::SitePermission, required: 'community_mod'
description 'Mark a held reaction as fine, unholding it.'
input do
argument :media_reaction_id, ID, required: true
end
result T... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/media_reaction/unlike.rb | Ruby | apache-2.0 | 187 | the-future | 784 | # frozen_string_literal: true
class Mutations::MediaReaction::Unlike < Mutations::Base
include FancyMutation
description 'Remove your like from a media reaction'
input do
argument :media_reaction_id, ID,
required: true,
description: 'The reaction to remove your like from'
end
result Types::... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/manga/delete.rb | Ruby | apache-2.0 | 187 | the-future | 512 | class Mutations::Manga::Delete < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::GenericDelete,
required: true,
description: 'Delete Manga',
as: :manga
field :manga, Types::GenericDelete, null: true
field :errors, [Types::Interface::Error], null: true
def load_... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/manga/create.rb | Ruby | apache-2.0 | 187 | the-future | 490 | class Mutations::Manga::Create < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Manga::Create,
required: true,
description: 'Create Manga',
as: :manga
field :manga, Types::Manga, null: true
field :errors, [Types::Interface::Error], null: true
def load_manga(va... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/manga/update.rb | Ruby | apache-2.0 | 187 | the-future | 547 | class Mutations::Manga::Update < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Manga::Update,
required: true,
description: 'Update Manga',
as: :manga
field :manga, Types::Manga, null: true
field :errors, [Types::Interface::Error], null: true
def load_manga(va... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/post/unhold.rb | Ruby | apache-2.0 | 187 | the-future | 661 | # frozen_string_literal: true
class Mutations::Post::Unhold < Mutations::Base
include FancyMutation
directive Directives::SitePermission, required: 'community_mod'
description 'Mark a held Post as fine, unholding it.'
input do
argument :id, ID, required: true
end
result Types::Post
errors Types::E... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/post/unlock.rb | Ruby | apache-2.0 | 187 | the-future | 600 | class Mutations::Post::Unlock < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Post::Unlock,
required: true,
description: 'Unlock a Post.',
as: :post
field :post, Types::Post, null: true
field :errors, [Types::Interface::Error], null: true
def load_post(value)... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/post/delete.rb | Ruby | apache-2.0 | 187 | the-future | 622 | # frozen_string_literal: true
class Mutations::Post::Delete < Mutations::Base
include FancyMutation
description 'Delete a post'
input do
argument :post_id, ID,
required: true,
description: 'The id of the post.'
end
result Types::Post
errors Types::Errors::NotAuthenticated,
Types::Erro... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/post/create.rb | Ruby | apache-2.0 | 187 | the-future | 626 | class Mutations::Post::Create < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Post::Create,
required: true,
description: 'Create a Post',
as: :post
field :post, Types::Post, null: true
field :errors, [Types::Interface::Error], null: true
def load_post(value)
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/post/lock.rb | Ruby | apache-2.0 | 187 | the-future | 590 | class Mutations::Post::Lock < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Post::Lock,
required: true,
description: 'Lock a Post.',
as: :post
field :post, Types::Post, null: true
field :errors, [Types::Interface::Error], null: true
def load_post(value)
p... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/block/delete.rb | Ruby | apache-2.0 | 187 | the-future | 635 | # frozen_string_literal: true
class Mutations::Block::Delete < Mutations::Base
include FancyMutation
description 'Unblock a user'
input do
argument :block_id, ID,
required: true,
description: 'The id of the block.'
end
result Types::Block
errors Types::Errors::NotAuthenticated,
Types:... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/block/create.rb | Ruby | apache-2.0 | 187 | the-future | 836 | # frozen_string_literal: true
class Mutations::Block::Create < Mutations::Base
include FancyMutation
description 'Block a user'
input do
argument :blocked_id, ID,
required: true,
description: 'The id of the user to block.'
end
result Types::Block
errors Types::Errors::NotAuthenticated,
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/favorite/create.rb | Ruby | apache-2.0 | 187 | the-future | 1,158 | # frozen_string_literal: true
class Mutations::Favorite::Create < Mutations::Base
include FancyMutation
description 'Add a favorite entry.'
input do
argument :id, ID,
required: true,
description: 'The id of the entry'
argument :type,
Types::Enum::FavoriteType,
required: true,
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/favorite/delete.rb | Ruby | apache-2.0 | 187 | the-future | 687 | # frozen_string_literal: true
class Mutations::Favorite::Delete < Mutations::Base
include FancyMutation
description 'Delete a favorite entry.'
input do
argument :favorite_id, ID,
required: true,
description: 'The id of the favorite entry.'
end
result Types::Favorite
errors Types::Errors::... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/account/update.rb | Ruby | apache-2.0 | 187 | the-future | 1,325 | # frozen_string_literal: true
class Mutations::Account::Update < Mutations::Base
include FancyMutation
description 'Update account'
input do
argument :sfw_filter_preference,
Types::Enum::SfwFilterPreference,
required: false,
description: 'The SFW Filter setting'
argument :country,
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/account/send_password_reset.rb | Ruby | apache-2.0 | 187 | the-future | 421 | class Mutations::Account::SendPasswordReset < Mutations::Base
include PublicMutation
include RateLimitedMutation
rate_limit do
limit 5, per: 24.hours
end
argument :email, String,
required: true,
description: 'The email address to reset the password for'
field :email, String, null: false
de... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/account/change_password.rb | Ruby | apache-2.0 | 187 | the-future | 1,067 | # frozen_string_literal: true
class Mutations::Account::ChangePassword < Mutations::Base
include PublicMutation
include RateLimitedMutation
include FancyMutation
description 'Change your Kitsu account password'
input do
argument :old_password, String,
required: true,
description: 'The curre... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/account/create.rb | Ruby | apache-2.0 | 187 | the-future | 1,195 | # frozen_string_literal: true
class Mutations::Account::Create < Mutations::Base
include PublicMutation
include RateLimitedMutation
include FancyMutation
description 'Create a new Kitsu account'
rate_limit do
limit 20, per: 1.hour
limit 20, per: 2.days
end
input do
argument :name, String,
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/mapping/update.rb | Ruby | apache-2.0 | 187 | the-future | 587 | class Mutations::Mapping::Update < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Mapping::Update,
required: true,
description: 'Update a Mapping',
as: :mapping
field :mapping, Types::Mapping, null: true
field :errors, [Types::Interface::Error], null: true
def... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/mapping/delete.rb | Ruby | apache-2.0 | 187 | the-future | 538 | class Mutations::Mapping::Delete < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::GenericDelete,
required: true,
description: 'Delete a Mapping',
as: :mapping
field :mapping, Types::GenericDelete, null: true
field :errors, [Types::Interface::Error], null: true
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/mapping/create.rb | Ruby | apache-2.0 | 187 | the-future | 524 | class Mutations::Mapping::Create < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Mapping::Create,
required: true,
description: 'Create a Mapping',
as: :mapping
field :mapping, Types::Mapping, null: true
field :errors, [Types::Interface::Error], null: true
def... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/episode/update.rb | Ruby | apache-2.0 | 187 | the-future | 588 | class Mutations::Episode::Update < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Episode::Update,
required: true,
description: 'Update an Episode',
as: :episode
field :episode, Types::Episode, null: true
field :errors, [Types::Interface::Error], null: true
de... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/episode/delete.rb | Ruby | apache-2.0 | 187 | the-future | 539 | class Mutations::Episode::Delete < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::GenericDelete,
required: true,
description: 'Delete an Episode',
as: :episode
field :episode, Types::GenericDelete, null: true
field :errors, [Types::Interface::Error], null: true
... |
github | hummingbird-me/kitsu-server | https://github.com/hummingbird-me/kitsu-server | app/graphql/mutations/episode/create.rb | Ruby | apache-2.0 | 187 | the-future | 525 | class Mutations::Episode::Create < Mutations::Base
prepend RescueValidationErrors
argument :input,
Types::Input::Episode::Create,
required: true,
description: 'Create an Episode',
as: :episode
field :episode, Types::Episode, null: true
field :errors, [Types::Interface::Error], null: true
de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.