From 05724476aae1e48ab0cda6ff7f80661b4e5e7599 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 6 May 2022 13:11:29 +0200 Subject: [PATCH] Remove unused addRelay mutation Signed-off-by: Thomas Citharel --- js/src/graphql/admin.ts | 9 --------- lib/graphql/resolvers/admin.ex | 9 --------- lib/graphql/schema/admin.ex | 7 ------- schema.graphql | 6 ------ 4 files changed, 31 deletions(-) diff --git a/js/src/graphql/admin.ts b/js/src/graphql/admin.ts index db6c473e9..f970d7879 100644 --- a/js/src/graphql/admin.ts +++ b/js/src/graphql/admin.ts @@ -131,15 +131,6 @@ export const ADD_INSTANCE = gql` ${INSTANCE_FRAGMENT} `; -export const ADD_RELAY = gql` - mutation addRelay($address: String!) { - addRelay(address: $address) { - ...relayFragment - } - } - ${RELAY_FRAGMENT} -`; - export const REMOVE_RELAY = gql` mutation removeRelay($address: String!) { removeRelay(address: $address) { diff --git a/lib/graphql/resolvers/admin.ex b/lib/graphql/resolvers/admin.ex index 485241516..43b6a1540 100644 --- a/lib/graphql/resolvers/admin.ex +++ b/lib/graphql/resolvers/admin.ex @@ -511,15 +511,6 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do end end - @spec create_relay(any(), map(), Absinthe.Resolution.t()) :: - {:ok, Follower.t()} | {:error, any()} - def create_relay(_parent, %{address: address}, %{context: %{current_user: %User{role: role}}}) - when is_admin(role) do - with {:ok, _activity, follow} <- Relay.follow(address) do - {:ok, follow} - end - end - @spec remove_relay(any(), map(), Absinthe.Resolution.t()) :: {:ok, Follower.t()} | {:error, any()} def remove_relay(_parent, %{address: address}, %{context: %{current_user: %User{role: role}}}) diff --git a/lib/graphql/schema/admin.ex b/lib/graphql/schema/admin.ex index 153364499..5bb65d032 100644 --- a/lib/graphql/schema/admin.ex +++ b/lib/graphql/schema/admin.ex @@ -352,13 +352,6 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do resolve(&Admin.create_instance/3) end - @desc "Add a relay subscription" - field :add_relay, type: :follower do - arg(:address, non_null(:string), description: "The relay hostname to add") - - resolve(&Admin.create_relay/3) - end - @desc "Delete a relay subscription" field :remove_relay, type: :follower do arg(:address, non_null(:string), description: "The relay hostname to delete") diff --git a/schema.graphql b/schema.graphql index 65907e253..925df234f 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1906,12 +1906,6 @@ type RootMutationType { domain: String! ): Instance - "Add a relay subscription" - addRelay( - "The relay hostname to add" - address: String! - ): Follower - "Delete a relay subscription" removeRelay( "The relay hostname to delete"