mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-02 03:00:32 -04:00
Renamed table names to be consistent snake_case (#255)
This commit is contained in:
@@ -1,25 +1,3 @@
|
||||
- table:
|
||||
schema: public
|
||||
name: Account
|
||||
object_relationships:
|
||||
- name: Player
|
||||
using:
|
||||
foreign_key_constraint_on: player_id
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns:
|
||||
- player_id
|
||||
- identifier
|
||||
- type
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns:
|
||||
- player_id
|
||||
- identifier
|
||||
- type
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: AccountType
|
||||
@@ -43,7 +21,38 @@
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: Guild
|
||||
name: GuildType
|
||||
is_enum: true
|
||||
array_relationships:
|
||||
- name: Guilds
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: type
|
||||
table:
|
||||
schema: public
|
||||
name: guild
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns:
|
||||
- name
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns:
|
||||
- name
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: PlayerRank
|
||||
is_enum: true
|
||||
- table:
|
||||
schema: public
|
||||
name: SkillCategory
|
||||
is_enum: true
|
||||
- table:
|
||||
schema: public
|
||||
name: guild
|
||||
object_relationships:
|
||||
- name: GuildType
|
||||
using:
|
||||
@@ -94,30 +103,58 @@
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: GuildType
|
||||
is_enum: true
|
||||
array_relationships:
|
||||
- name: Guilds
|
||||
name: guild_account
|
||||
object_relationships:
|
||||
- name: AccountType
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: type
|
||||
table:
|
||||
foreign_key_constraint_on: type
|
||||
- name: Guild
|
||||
using:
|
||||
foreign_key_constraint_on: guild_id
|
||||
- table:
|
||||
schema: public
|
||||
name: guild_player
|
||||
object_relationships:
|
||||
- name: Guild
|
||||
using:
|
||||
foreign_key_constraint_on: guild_id
|
||||
- name: Player
|
||||
using:
|
||||
foreign_key_constraint_on: player_id
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns: []
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns: []
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: me
|
||||
object_relationships:
|
||||
- name: player
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
schema: public
|
||||
name: Guild
|
||||
name: player
|
||||
column_mapping:
|
||||
id: id
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns:
|
||||
- name
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns:
|
||||
- name
|
||||
filter: {}
|
||||
- id
|
||||
- username
|
||||
- ethereum_address
|
||||
filter:
|
||||
id:
|
||||
_eq: X-Hasura-User-Id
|
||||
- table:
|
||||
schema: public
|
||||
name: Player
|
||||
name: player
|
||||
object_relationships:
|
||||
- name: EnneagramType
|
||||
using:
|
||||
@@ -132,7 +169,7 @@
|
||||
column: player_id
|
||||
table:
|
||||
schema: public
|
||||
name: Account
|
||||
name: player_account
|
||||
- name: guilds
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
@@ -146,7 +183,7 @@
|
||||
column: player_id
|
||||
table:
|
||||
schema: public
|
||||
name: Player_Skill
|
||||
name: player_skill
|
||||
remote_relationships:
|
||||
- definition:
|
||||
remote_field:
|
||||
@@ -230,31 +267,29 @@
|
||||
webhook_from_env: TRIGGERS_ENDPOINT
|
||||
- table:
|
||||
schema: public
|
||||
name: PlayerType
|
||||
name: player_account
|
||||
object_relationships:
|
||||
- name: Player
|
||||
using:
|
||||
foreign_key_constraint_on: player_id
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns:
|
||||
- description
|
||||
- id
|
||||
- imageUrl
|
||||
- title
|
||||
- player_id
|
||||
- identifier
|
||||
- type
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns:
|
||||
- id
|
||||
- description
|
||||
- imageUrl
|
||||
- title
|
||||
- player_id
|
||||
- identifier
|
||||
- type
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: Player_Rank
|
||||
is_enum: true
|
||||
- table:
|
||||
schema: public
|
||||
name: Player_Skill
|
||||
name: player_skill
|
||||
object_relationships:
|
||||
- name: Skill
|
||||
using:
|
||||
@@ -293,7 +328,27 @@
|
||||
_eq: X-Hasura-User-Id
|
||||
- table:
|
||||
schema: public
|
||||
name: Skill
|
||||
name: player_type
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns:
|
||||
- description
|
||||
- id
|
||||
- imageUrl
|
||||
- title
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns:
|
||||
- id
|
||||
- description
|
||||
- imageUrl
|
||||
- title
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: skill
|
||||
array_relationships:
|
||||
- name: Player_Skills
|
||||
using:
|
||||
@@ -301,7 +356,7 @@
|
||||
column: skill_id
|
||||
table:
|
||||
schema: public
|
||||
name: Player_Skill
|
||||
name: player_skill
|
||||
insert_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
@@ -326,58 +381,3 @@
|
||||
- id
|
||||
filter: {}
|
||||
allow_aggregations: true
|
||||
- table:
|
||||
schema: public
|
||||
name: SkillCategory
|
||||
is_enum: true
|
||||
- table:
|
||||
schema: public
|
||||
name: guild_account
|
||||
object_relationships:
|
||||
- name: AccountType
|
||||
using:
|
||||
foreign_key_constraint_on: type
|
||||
- name: Guild
|
||||
using:
|
||||
foreign_key_constraint_on: guild_id
|
||||
- table:
|
||||
schema: public
|
||||
name: guild_player
|
||||
object_relationships:
|
||||
- name: Guild
|
||||
using:
|
||||
foreign_key_constraint_on: guild_id
|
||||
- name: Player
|
||||
using:
|
||||
foreign_key_constraint_on: player_id
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns: []
|
||||
filter: {}
|
||||
- role: public
|
||||
permission:
|
||||
columns: []
|
||||
filter: {}
|
||||
- table:
|
||||
schema: public
|
||||
name: me
|
||||
object_relationships:
|
||||
- name: player
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
schema: public
|
||||
name: Player
|
||||
column_mapping:
|
||||
id: id
|
||||
select_permissions:
|
||||
- role: player
|
||||
permission:
|
||||
columns:
|
||||
- id
|
||||
- username
|
||||
- ethereum_address
|
||||
filter:
|
||||
id:
|
||||
_eq: X-Hasura-User-Id
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."player" rename to "Player";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."Player" rename to "player";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."skill" rename to "Skill";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."Skill" rename to "skill";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."player_skill" rename to "Player_Skill";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."Player_Skill" rename to "player_skill";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."player_type" rename to "PlayerType";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."PlayerType" rename to "player_type";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."guild" rename to "Guild";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."Guild" rename to "guild";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."player_account" rename to "Account";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."Account" rename to "player_account";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."PlayerRank" rename to "Player_Rank";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."Player_Rank" rename to "PlayerRank";
|
||||
@@ -5,11 +5,11 @@ import fetch from 'node-fetch';
|
||||
import api from 'sourcecred';
|
||||
|
||||
import {
|
||||
Account_Constraint,
|
||||
AccountType_Enum,
|
||||
Player_Account_Constraint,
|
||||
Player_Constraint,
|
||||
Player_Rank_Enum,
|
||||
Player_Update_Column,
|
||||
PlayerRank_Enum,
|
||||
} from '../../../lib/autogen/hasura-sdk';
|
||||
import { client } from '../../../lib/hasuraClient';
|
||||
import { AddressBookEntry, SCAccountsData, SCAlias } from './types';
|
||||
@@ -49,11 +49,11 @@ const parseAlias = (alias: SCAlias) => {
|
||||
};
|
||||
|
||||
const RANKS = [
|
||||
Player_Rank_Enum.Diamond,
|
||||
Player_Rank_Enum.Platinum,
|
||||
Player_Rank_Enum.Gold,
|
||||
Player_Rank_Enum.Silver,
|
||||
Player_Rank_Enum.Bronze,
|
||||
PlayerRank_Enum.Diamond,
|
||||
PlayerRank_Enum.Platinum,
|
||||
PlayerRank_Enum.Gold,
|
||||
PlayerRank_Enum.Silver,
|
||||
PlayerRank_Enum.Bronze,
|
||||
];
|
||||
|
||||
const NUM_PLAYERS_PER_RANK = 10;
|
||||
@@ -71,7 +71,7 @@ export const migrateSourceCredAccounts = async (
|
||||
).json();
|
||||
|
||||
const accountOnConflict = {
|
||||
constraint: Account_Constraint.AccountIdentifierTypeKey,
|
||||
constraint: Player_Account_Constraint.AccountIdentifierTypeKey,
|
||||
update_columns: [],
|
||||
};
|
||||
|
||||
@@ -119,7 +119,7 @@ export const migrateSourceCredAccounts = async (
|
||||
|
||||
try {
|
||||
const updateResult = await client.UpdatePlayer(vars);
|
||||
const affected = updateResult.update_Player?.affected_rows;
|
||||
const affected = updateResult.update_player?.affected_rows;
|
||||
if (affected === 0) {
|
||||
return player;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ export const migrateSourceCredAccounts = async (
|
||||
throw new Error('Multiple players updated incorrectly');
|
||||
}
|
||||
|
||||
const playerId = updateResult.update_Player?.returning[0]?.id;
|
||||
const playerId = updateResult.update_player?.returning[0]?.id;
|
||||
if (playerId) {
|
||||
try {
|
||||
await client.UpsertAccount({
|
||||
|
||||
@@ -10,7 +10,7 @@ export async function updateVerifiedAccounts(
|
||||
const updatedProfiles: string[] = [];
|
||||
const data = await client.GetPlayer({ playerId });
|
||||
|
||||
const ethAddress = data.Player_by_pk?.ethereum_address;
|
||||
const ethAddress = data.player_by_pk?.ethereum_address;
|
||||
|
||||
if (!ethAddress) {
|
||||
throw new Error('unknown-player');
|
||||
@@ -29,7 +29,7 @@ export async function updateVerifiedAccounts(
|
||||
},
|
||||
],
|
||||
});
|
||||
if (result.insert_Account?.affected_rows) {
|
||||
if (result.insert_player_account?.affected_rows) {
|
||||
updatedProfiles.push('github');
|
||||
} else {
|
||||
console.warn(
|
||||
@@ -48,7 +48,7 @@ export async function updateVerifiedAccounts(
|
||||
},
|
||||
],
|
||||
});
|
||||
if (result.insert_Account?.affected_rows) {
|
||||
if (result.insert_player_account?.affected_rows) {
|
||||
updatedProfiles.push('twitter');
|
||||
} else {
|
||||
console.warn(
|
||||
|
||||
@@ -5,10 +5,10 @@ async function createPlayer(ethAddress: string) {
|
||||
ethereum_address: ethAddress,
|
||||
username: ethAddress,
|
||||
});
|
||||
if (resProfile.insert_Player?.affected_rows !== 1) {
|
||||
if (resProfile.insert_player?.affected_rows !== 1) {
|
||||
throw new Error('Error while creating player');
|
||||
}
|
||||
return resProfile.insert_Player.returning[0];
|
||||
return resProfile.insert_player.returning[0];
|
||||
}
|
||||
|
||||
export async function getOrCreatePlayer(ethAddress: string) {
|
||||
@@ -16,7 +16,7 @@ export async function getOrCreatePlayer(ethAddress: string) {
|
||||
ethereum_address: ethAddress,
|
||||
});
|
||||
|
||||
let player = res.Player[0];
|
||||
let player = res.player[0];
|
||||
|
||||
if (!player) {
|
||||
player = await createPlayer(ethAddress);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { gql } from 'graphql-request/dist';
|
||||
|
||||
export const CreatePlayerFromETH = gql`
|
||||
mutation CreatePlayerFromETH($ethereum_address: String!, $username: String!) {
|
||||
insert_Player(
|
||||
insert_player(
|
||||
objects: { username: $username, ethereum_address: $ethereum_address }
|
||||
) {
|
||||
affected_rows
|
||||
@@ -17,13 +17,13 @@ export const CreatePlayerFromETH = gql`
|
||||
|
||||
export const UpsertAccount = gql`
|
||||
mutation UpsertAccount(
|
||||
$objects: [Account_insert_input!]!
|
||||
$on_conflict: Account_on_conflict = {
|
||||
$objects: [player_account_insert_input!]!
|
||||
$on_conflict: player_account_on_conflict = {
|
||||
constraint: Account_identifier_type_key
|
||||
update_columns: []
|
||||
}
|
||||
) {
|
||||
insert_Account(objects: $objects, on_conflict: $on_conflict) {
|
||||
insert_player_account(objects: $objects, on_conflict: $on_conflict) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
@@ -31,10 +31,10 @@ export const UpsertAccount = gql`
|
||||
|
||||
export const UpsertPlayer = gql`
|
||||
mutation UpsertPlayer(
|
||||
$objects: [Player_insert_input!]!
|
||||
$onConflict: Player_on_conflict
|
||||
$objects: [player_insert_input!]!
|
||||
$onConflict: player_on_conflict
|
||||
) {
|
||||
insert_Player(on_conflict: $onConflict, objects: $objects) {
|
||||
insert_player(on_conflict: $onConflict, objects: $objects) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
@@ -45,11 +45,11 @@ export const UpdatePlayer = gql`
|
||||
$ethAddress: String
|
||||
$identityId: String
|
||||
$username: String
|
||||
$rank: Player_Rank_enum
|
||||
$rank: PlayerRank_enum
|
||||
$totalXp: numeric
|
||||
$discordId: String
|
||||
) {
|
||||
update_Player(
|
||||
update_player(
|
||||
where: {
|
||||
_or: [
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ import { gql } from 'graphql-request/dist';
|
||||
|
||||
export const GetPlayer = gql`
|
||||
query GetPlayer($playerId: uuid!) {
|
||||
Player_by_pk(id: $playerId) {
|
||||
player_by_pk(id: $playerId) {
|
||||
id
|
||||
ethereum_address
|
||||
}
|
||||
@@ -11,7 +11,7 @@ export const GetPlayer = gql`
|
||||
|
||||
export const GetPlayerFromEth = gql`
|
||||
query GetPlayerFromETH($ethereum_address: String) {
|
||||
Player(where: { ethereum_address: { _eq: $ethereum_address } }) {
|
||||
player(where: { ethereum_address: { _eq: $ethereum_address } }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import gql from 'graphql-tag';
|
||||
|
||||
export const Player = gql`
|
||||
fragment Player on Player {
|
||||
fragment Player on player {
|
||||
id
|
||||
totalXp
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import { PlayerType } from 'graphql/autogen/types';
|
||||
import { Player_Type } from 'graphql/autogen/types';
|
||||
import { Membership, PersonalityType } from 'graphql/types';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useCallback, useContext, useEffect, useState } from 'react';
|
||||
@@ -25,7 +25,7 @@ type SetupContextType = {
|
||||
numTotalSteps: number;
|
||||
skillsList: Array<CategoryOption>;
|
||||
personalityTypes: Array<PersonalityType>;
|
||||
playerTypes: Array<PlayerType>;
|
||||
playerTypes: Array<Player_Type>;
|
||||
username: string;
|
||||
setUsername: React.Dispatch<React.SetStateAction<string>>;
|
||||
skills: Array<SkillOption>;
|
||||
@@ -34,8 +34,8 @@ type SetupContextType = {
|
||||
setPersonalityType: React.Dispatch<
|
||||
React.SetStateAction<PersonalityType | undefined>
|
||||
>;
|
||||
playerType: PlayerType | undefined;
|
||||
setPlayerType: React.Dispatch<React.SetStateAction<PlayerType | undefined>>;
|
||||
playerType: Player_Type | undefined;
|
||||
setPlayerType: React.Dispatch<React.SetStateAction<Player_Type | undefined>>;
|
||||
availability: string;
|
||||
setAvailability: React.Dispatch<React.SetStateAction<string>>;
|
||||
timeZone: string;
|
||||
@@ -77,7 +77,7 @@ type Props = {
|
||||
options: Array<SetupOption>;
|
||||
skillsList: Array<CategoryOption>;
|
||||
personalityTypes: Array<PersonalityType>;
|
||||
playerTypes: Array<PlayerType>;
|
||||
playerTypes: Array<Player_Type>;
|
||||
};
|
||||
|
||||
export const SetupContextProvider: React.FC<Props> = ({
|
||||
@@ -135,7 +135,7 @@ export const SetupContextProvider: React.FC<Props> = ({
|
||||
const [username, setUsername] = useState<string>('');
|
||||
const [skills, setSkills] = useState<Array<SkillOption>>([]);
|
||||
const [personalityType, setPersonalityType] = useState<PersonalityType>();
|
||||
const [playerType, setPlayerType] = useState<PlayerType>();
|
||||
const [playerType, setPlayerType] = useState<Player_Type>();
|
||||
const [availability, setAvailability] = useState<string>('');
|
||||
const [timeZone, setTimeZone] = useState<string>('');
|
||||
const [memberships, setMemberships] = useState<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import gql from 'fake-tag';
|
||||
|
||||
export const PlayerFragment = gql`
|
||||
fragment PlayerFragment on Player {
|
||||
fragment PlayerFragment on player {
|
||||
id
|
||||
username
|
||||
totalXp
|
||||
@@ -58,7 +58,7 @@ export const PlayerFragment = gql`
|
||||
`;
|
||||
|
||||
export const GuildFragment = gql`
|
||||
fragment GuildFragment on Guild {
|
||||
fragment GuildFragment on guild {
|
||||
id
|
||||
guildname
|
||||
description
|
||||
|
||||
@@ -6,7 +6,7 @@ import { GuildFragment } from './fragments';
|
||||
|
||||
const guildQuery = gql`
|
||||
query GetGuild($guildname: String!) {
|
||||
Guild(where: { guildname: { _eq: $guildname } }) {
|
||||
guild(where: { guildname: { _eq: $guildname } }) {
|
||||
...GuildFragment
|
||||
}
|
||||
}
|
||||
@@ -19,5 +19,5 @@ export const getGuild = async (guildname: string | undefined) => {
|
||||
.query<GetGuildQuery, GetGuildQueryVariables>(guildQuery, { guildname })
|
||||
.toPromise();
|
||||
|
||||
return data?.Guild[0];
|
||||
return data?.guild[0];
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ import { GuildFragment } from './fragments';
|
||||
|
||||
const guildsQuery = gql`
|
||||
query GetGuilds($limit: Int) {
|
||||
Guild(limit: $limit) {
|
||||
guild(limit: $limit) {
|
||||
...GuildFragment
|
||||
}
|
||||
}
|
||||
@@ -26,5 +26,5 @@ export const getGuilds = async (limit = 50) => {
|
||||
return [];
|
||||
}
|
||||
|
||||
return data.Guild;
|
||||
return data.guild;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ import { PlayerFragment } from './fragments';
|
||||
|
||||
const playerQuery = gql`
|
||||
query GetPlayer($username: String!) {
|
||||
Player(where: { username: { _eq: $username } }) {
|
||||
player(where: { username: { _eq: $username } }) {
|
||||
...PlayerFragment
|
||||
}
|
||||
}
|
||||
@@ -19,5 +19,5 @@ export const getPlayer = async (username: string | undefined) => {
|
||||
.query<GetPlayerQuery, GetPlayerQueryVariables>(playerQuery, { username })
|
||||
.toPromise();
|
||||
|
||||
return data?.Player[0];
|
||||
return data?.player[0];
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ import { client } from './client';
|
||||
|
||||
export const GetPlayerTypes = gql`
|
||||
query GetPlayerTypes {
|
||||
PlayerType {
|
||||
player_type {
|
||||
description
|
||||
id
|
||||
title
|
||||
@@ -27,5 +27,5 @@ export const getPlayerTypes = async () => {
|
||||
return [];
|
||||
}
|
||||
|
||||
return data.PlayerType;
|
||||
return data.player_type;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ import { PlayerFragment } from './fragments';
|
||||
|
||||
const playersQuery = gql`
|
||||
query GetPlayers($limit: Int) {
|
||||
Player(order_by: { totalXp: desc }, limit: $limit) {
|
||||
player(order_by: { totalXp: desc }, limit: $limit) {
|
||||
...PlayerFragment
|
||||
}
|
||||
}
|
||||
@@ -26,5 +26,5 @@ export const getPlayers = async (limit = 50) => {
|
||||
return [];
|
||||
}
|
||||
|
||||
return data.Player;
|
||||
return data.player;
|
||||
};
|
||||
|
||||
@@ -4,14 +4,14 @@ import { client } from 'graphql/client';
|
||||
|
||||
const skillsQuery = gql`
|
||||
query GetSkills {
|
||||
Skill(
|
||||
skill(
|
||||
order_by: { Player_Skills_aggregate: { count: desc }, category: asc }
|
||||
) {
|
||||
...PlayerSkill
|
||||
}
|
||||
}
|
||||
|
||||
fragment PlayerSkill on Skill {
|
||||
fragment PlayerSkill on skill {
|
||||
id
|
||||
name
|
||||
category
|
||||
@@ -31,5 +31,5 @@ export const getSkills = async (): Promise<PlayerSkillFragment[]> => {
|
||||
return [];
|
||||
}
|
||||
|
||||
return data.Skill;
|
||||
return data.skill;
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import gql from 'fake-tag';
|
||||
|
||||
export const UpdateAboutYouMutation = gql`
|
||||
mutation UpdateAboutYou($playerId: uuid!, $input: Player_set_input!) {
|
||||
update_Player_by_pk(pk_columns: { id: $playerId }, _set: $input) {
|
||||
mutation UpdateAboutYou($playerId: uuid!, $input: player_set_input!) {
|
||||
update_player_by_pk(pk_columns: { id: $playerId }, _set: $input) {
|
||||
enneagram
|
||||
playerType {
|
||||
description
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import gql from 'fake-tag';
|
||||
|
||||
export const UpdateProfileMutation = gql`
|
||||
mutation UpdateProfile($playerId: uuid!, $input: Player_set_input!) {
|
||||
update_Player_by_pk(pk_columns: { id: $playerId }, _set: $input) {
|
||||
mutation UpdateProfile($playerId: uuid!, $input: player_set_input!) {
|
||||
update_player_by_pk(pk_columns: { id: $playerId }, _set: $input) {
|
||||
id
|
||||
availability_hours
|
||||
tz
|
||||
|
||||
@@ -2,12 +2,12 @@ import gql from 'fake-tag';
|
||||
|
||||
export const UpdateSkillsMutation = gql`
|
||||
mutation UpdatePlayerSkills(
|
||||
$skills: [Player_Skill_insert_input!]!
|
||||
$skills: [player_skill_insert_input!]!
|
||||
) {
|
||||
delete_Player_Skill(where: {}) {
|
||||
delete_player_skill(where: {}) {
|
||||
affected_rows
|
||||
}
|
||||
insert_Player_Skill(objects: $skills) {
|
||||
insert_player_skill(objects: $skills) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import gql from 'fake-tag';
|
||||
|
||||
export const UpdateUsernameMutation = gql`
|
||||
mutation UpdatePlayerUsername($username: String!) {
|
||||
update_Player(_set: { username: $username }, where: {}) {
|
||||
update_player(_set: { username: $username }, where: {}) {
|
||||
returning {
|
||||
id
|
||||
username
|
||||
|
||||
Reference in New Issue
Block a user