From 68a4222a18204aa67a862a919af59ae1a0d090af Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 20 Nov 2020 15:24:04 +0100 Subject: [PATCH] Add missing leftover documentation for GraphQL schema Signed-off-by: Thomas Citharel --- lib/graphql/schema/actors/member.ex | 3 +++ lib/graphql/schema/address.ex | 12 ++++++++++++ lib/graphql/schema/user.ex | 3 +++ 3 files changed, 18 insertions(+) diff --git a/lib/graphql/schema/actors/member.ex b/lib/graphql/schema/actors/member.ex index 8a76cab4f..5d68f9852 100644 --- a/lib/graphql/schema/actors/member.ex +++ b/lib/graphql/schema/actors/member.ex @@ -80,6 +80,9 @@ defmodule Mobilizon.GraphQL.Schema.Actors.MemberType do resolve(&Member.reject_invitation/3) end + @desc """ + Update a member's role + """ field :update_member, :member do arg(:member_id, non_null(:id), description: "The member ID") arg(:role, non_null(:member_role_enum), description: "The new member role") diff --git a/lib/graphql/schema/address.ex b/lib/graphql/schema/address.ex index e539a55c0..0518c1337 100644 --- a/lib/graphql/schema/address.ex +++ b/lib/graphql/schema/address.ex @@ -6,6 +6,9 @@ defmodule Mobilizon.GraphQL.Schema.AddressType do alias Mobilizon.GraphQL.Resolvers.Address + @desc """ + An address object + """ object :address do field(:geom, :point, description: "The geocoordinates for the point where this address is") field(:street, :string, description: "The address's street name (with number)") @@ -20,16 +23,25 @@ defmodule Mobilizon.GraphQL.Schema.AddressType do field(:origin_id, :string, description: "The address's original ID from the provider") end + @desc """ + A phone address + """ object :phone_address do field(:phone, :string, description: "The phone number") field(:info, :string, description: "Additional information about the phone number") end + @desc """ + An online address + """ object :online_address do field(:url, :string) field(:info, :string) end + @desc """ + An address input + """ input_object :address_input do # Either a full picture object field(:geom, :point, description: "The geocoordinates for the point where this address is") diff --git a/lib/graphql/schema/user.ex b/lib/graphql/schema/user.ex index ea2a943e8..4986aa10c 100644 --- a/lib/graphql/schema/user.ex +++ b/lib/graphql/schema/user.ex @@ -136,6 +136,9 @@ defmodule Mobilizon.GraphQL.Schema.UserType do value(:id, description: "The user's ID") end + @desc """ + A set of user settings + """ object :user_settings do field(:timezone, :string, description: "The timezone for this user")