mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
feat: inital search function
This commit is contained in:
@@ -1,10 +1,3 @@
|
||||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M23.8359 22.575L17.7891 16.5281C17.6812 16.4203 17.5406 16.3641 17.3906 16.3641H16.9078C18.5156 14.625 19.5 12.3047 19.5 9.75C19.5 4.36406 15.1359 0 9.75 0C4.36406 0 0 4.36406 0 9.75C0 15.1359 4.36406 19.5 9.75 19.5C12.3047 19.5 14.625 18.5156 16.3641 16.9125V17.3906C16.3641 17.5406 16.425 17.6812 16.5281 17.7891L22.575 23.8359C22.7953 24.0562 23.1516 24.0562 23.3719 23.8359L23.8359 23.3719C24.0562 23.1516 24.0562 22.7953 23.8359 22.575ZM9.75 18C5.18906 18 1.5 14.3109 1.5 9.75C1.5 5.18906 5.18906 1.5 9.75 1.5C14.3109 1.5 18 5.18906 18 9.75C18 14.3109 14.3109 18 9.75 18Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.8906 15.05L11.8594 11.0188C11.7875 10.9469 11.6938 10.9094 11.5938 10.9094H11.2719C12.3438 9.75 13 8.20312 13 6.5C13 2.90937 10.0906 0 6.5 0C2.90937 0 0 2.90937 0 6.5C0 10.0906 2.90937 13 6.5 13C8.20312 13 9.75 12.3438 10.9094 11.275V11.5938C10.9094 11.6938 10.95 11.7875 11.0188 11.8594L15.05 15.8906C15.1969 16.0375 15.4344 16.0375 15.5813 15.8906L15.8906 15.5813C16.0375 15.4344 16.0375 15.1969 15.8906 15.05ZM6.5 12C3.45937 12 1 9.54062 1 6.5C1 3.45937 3.45937 1 6.5 1C9.54062 1 12 3.45937 12 6.5C12 9.54062 9.54062 12 6.5 12Z" fill="#A0AEC0"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 665 B |
@@ -2,7 +2,6 @@ import {
|
||||
Avatar,
|
||||
Badge,
|
||||
Box,
|
||||
BoxedNextImage,
|
||||
Button,
|
||||
ChevronDownIcon,
|
||||
ChevronUpIcon,
|
||||
@@ -11,12 +10,7 @@ import {
|
||||
Flex,
|
||||
HamburgerIcon,
|
||||
Icon,
|
||||
Input,
|
||||
InputGroup,
|
||||
InputLeftElement,
|
||||
Link,
|
||||
LinkBox,
|
||||
LinkOverlay,
|
||||
LogOut,
|
||||
Menu,
|
||||
MenuButton,
|
||||
@@ -24,7 +18,6 @@ import {
|
||||
MenuList,
|
||||
MetaButton,
|
||||
Profile,
|
||||
SelectSearch,
|
||||
SimpleGrid,
|
||||
Spinner,
|
||||
Stack,
|
||||
@@ -61,19 +54,17 @@ import { MetaLink } from 'components/Link';
|
||||
import { PlayerFragmentFragment } from 'graphql/autogen/types';
|
||||
import { usePSeedBalance } from 'lib/hooks/balances';
|
||||
import Image from 'next/image';
|
||||
import { useRouter } from 'next/router';
|
||||
import router from 'next/router';
|
||||
import React, { useCallback } from 'react';
|
||||
import { components } from 'react-select';
|
||||
import AsyncSelect from 'react-select/async';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
import { getPlayerImage, getPlayerName } from 'utils/playerHelpers';
|
||||
|
||||
import SearchIcon from '../assets/search-icon.svg';
|
||||
// import SearchIcon from '../assets/search-icon.svg';
|
||||
import SeedMarket from '../assets/seed-icon.svg';
|
||||
import XPStar from '../assets/xp-star.svg';
|
||||
import { useNavSearch } from '../contexts/NavSearchContext';
|
||||
import { getGuildsByText } from '../graphql/getGuilds';
|
||||
import { getPlayersByText } from '../graphql/getPlayers';
|
||||
import { getGuildsByText } from '../graphql/queries/guild';
|
||||
import { useUser, useWeb3 } from '../lib/hooks';
|
||||
import {
|
||||
MenuLinkItem,
|
||||
@@ -341,14 +332,13 @@ const SeeAllComponent = ({ text, url }: { text: string; url: string }) => (
|
||||
// Search -- not working yet
|
||||
const Search = () => {
|
||||
const [inputValue, setValue] = React.useState('');
|
||||
const [selectedValue, setSelectedValue] = React.useState(null);
|
||||
const [searchQuery, setSearchQuery] = React.useState('');
|
||||
const [selectedValue, setSelectedValue] = React.useState<string>('');
|
||||
|
||||
const debounced = useDebouncedCallback(async () => {
|
||||
const { players } = await getPlayersByText(`%${inputValue}%`);
|
||||
const { guilds } = await getGuildsByText(`%${inputValue}%`);
|
||||
|
||||
const mappedPlayersOptions = players.map((player) => ({
|
||||
let mappedPlayersOptions = players.map((player) => ({
|
||||
label: (
|
||||
<Link href={`/player/${player.username}`}>
|
||||
<Flex align="center">
|
||||
@@ -365,7 +355,7 @@ const Search = () => {
|
||||
value: player.username,
|
||||
}));
|
||||
|
||||
const mappedGuildsOptions = guilds.map((guild) => ({
|
||||
let mappedGuildsOptions = guilds.map((guild) => ({
|
||||
value: guild.guildname,
|
||||
label: (
|
||||
<Link href={`/guild/${guild.guildname}`}>
|
||||
@@ -377,48 +367,58 @@ const Search = () => {
|
||||
),
|
||||
}));
|
||||
|
||||
const mappedPlayers =
|
||||
mappedPlayersOptions.length === 3
|
||||
? [
|
||||
...mappedPlayersOptions,
|
||||
{
|
||||
label: (
|
||||
<SeeAllComponent
|
||||
text="players"
|
||||
url={`/community/search?q=${encodeURI(inputValue)}`}
|
||||
/>
|
||||
),
|
||||
value: '',
|
||||
},
|
||||
]
|
||||
: mappedPlayersOptions;
|
||||
if (mappedPlayersOptions.length === 3) {
|
||||
mappedPlayersOptions = [
|
||||
...mappedPlayersOptions,
|
||||
{
|
||||
label: (
|
||||
<SeeAllComponent
|
||||
text="players"
|
||||
url={`/search/players?q=${encodeURI(inputValue)}`}
|
||||
/>
|
||||
),
|
||||
value: '',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
if (mappedGuildsOptions.length === 3) {
|
||||
mappedGuildsOptions = [
|
||||
...mappedGuildsOptions,
|
||||
{
|
||||
label: (
|
||||
<SeeAllComponent
|
||||
text="guilds"
|
||||
url={`/search/guilds?q=${encodeURI(inputValue)}`}
|
||||
/>
|
||||
),
|
||||
value: '',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
label: 'Players',
|
||||
options: mappedPlayers,
|
||||
options: mappedPlayersOptions,
|
||||
},
|
||||
{
|
||||
label: 'Guilds',
|
||||
options: mappedGuildsOptions,
|
||||
},
|
||||
];
|
||||
}, 300);
|
||||
|
||||
const { setSearch } = useNavSearch();
|
||||
|
||||
}, 200);
|
||||
const handleSubmit = (e: React.ChangeEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setSearch(searchQuery);
|
||||
setSearchQuery('');
|
||||
router.push(`/search/players?q=${inputValue}`);
|
||||
};
|
||||
|
||||
const handleInputChange = (value: any) => {
|
||||
const handleInputChange = (value: string) => {
|
||||
setValue(value);
|
||||
};
|
||||
|
||||
// handle selection
|
||||
const handleChange = (value: any) => {
|
||||
const handleChange = (value: string) => {
|
||||
setSelectedValue(value);
|
||||
};
|
||||
|
||||
@@ -556,7 +556,6 @@ const PlayerStats: React.FC<PlayerStatsProps> = ({ player }) => {
|
||||
|
||||
export const MegaMenu: React.FC = () => {
|
||||
const { connected, connect } = useWeb3();
|
||||
const router = useRouter();
|
||||
|
||||
const handleLoginClick = useCallback(async () => {
|
||||
await connect();
|
||||
|
||||
80
packages/web/components/SearchFilters.tsx
Normal file
80
packages/web/components/SearchFilters.tsx
Normal file
@@ -0,0 +1,80 @@
|
||||
import { Box, Text, VStack, Wrap } from '@metafam/ds';
|
||||
// import NextLink from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import React from 'react';
|
||||
|
||||
import { GlobalFilters } from '../utils/GlobalSearch';
|
||||
|
||||
const FilterItems = [
|
||||
{
|
||||
name: GlobalFilters.PLAYERS,
|
||||
baseUrl: '/search/players',
|
||||
},
|
||||
{
|
||||
name: GlobalFilters.GUILDS,
|
||||
baseUrl: '/search/guilds',
|
||||
},
|
||||
{
|
||||
name: GlobalFilters.PATRONS,
|
||||
baseUrl: '/search/patrons',
|
||||
},
|
||||
];
|
||||
|
||||
const SearchFilters: any = ({
|
||||
activeFilter,
|
||||
search,
|
||||
}: {
|
||||
activeFilter: string;
|
||||
search: string;
|
||||
}) => {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<VStack
|
||||
w="100%"
|
||||
spacing={{ base: '4', md: '8' }}
|
||||
pb={{ base: '16', lg: '0' }}
|
||||
>
|
||||
<Text fontSize="lg" fontWeight="bold" as="div" mx="auto">
|
||||
Search Results for "{search}"
|
||||
</Text>
|
||||
<Wrap
|
||||
transition="all 0.25s"
|
||||
py="2"
|
||||
style={{ backdropFilter: 'blur(7px)' }}
|
||||
position="sticky"
|
||||
top="-1px"
|
||||
borderTop="1px solid transparent"
|
||||
zIndex="1"
|
||||
justify="center"
|
||||
w={'100%'}
|
||||
maxW={'79rem'}
|
||||
// bg={isSticky ? 'purpleTag70' : 'whiteAlpha.200'}
|
||||
px={'1.5rem'}
|
||||
borderRadius={'6px'}
|
||||
>
|
||||
{FilterItems.map((item) => (
|
||||
<Box
|
||||
justify="center"
|
||||
p="4"
|
||||
borderBottomWidth={activeFilter === item.name ? '1px' : '0px'}
|
||||
borderBottomColor={
|
||||
activeFilter === item.name ? 'cyanText' : undefined
|
||||
}
|
||||
onClick={() => router.push(`${item.baseUrl}?q=${search}`)}
|
||||
>
|
||||
<Text
|
||||
cursor="pointer"
|
||||
color={activeFilter === item.name ? 'cyanText' : 'gray.400'}
|
||||
fontSize="xl"
|
||||
>
|
||||
{item.name}
|
||||
</Text>
|
||||
</Box>
|
||||
))}
|
||||
</Wrap>
|
||||
</VStack>
|
||||
);
|
||||
};
|
||||
|
||||
export default SearchFilters;
|
||||
@@ -111,7 +111,6 @@ export const SetupSkills: React.FC<SetupSkillsProps> = ({
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<FlexContainer>
|
||||
{isWizard && (
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useContext, useReducer } from 'react';
|
||||
|
||||
enum ActionKind {
|
||||
SET_SEARCH = 'SET_SEARCH',
|
||||
CLEAR_SEARCH = 'CLEAR_SEARCH',
|
||||
}
|
||||
|
||||
const INITIAL_STATE = {
|
||||
search: '',
|
||||
};
|
||||
|
||||
type NavSearchContextType = {
|
||||
search: string;
|
||||
setSearch: (search: string) => void;
|
||||
clearSearch: () => void;
|
||||
};
|
||||
|
||||
type State = {
|
||||
search: string;
|
||||
};
|
||||
|
||||
interface Action {
|
||||
type: string;
|
||||
payload: string;
|
||||
}
|
||||
|
||||
function searchReducer(state: State, action: Action) {
|
||||
switch (action.type) {
|
||||
case ActionKind.SET_SEARCH:
|
||||
return {
|
||||
...state,
|
||||
search: action.payload,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
export const NavSearchContext = React.createContext<NavSearchContextType>({
|
||||
search: '',
|
||||
setSearch: () => {},
|
||||
clearSearch: () => {},
|
||||
});
|
||||
|
||||
export const NavSearchContextProvider: React.FC = ({ children }) => {
|
||||
const [state, dispatch] = useReducer(searchReducer, INITIAL_STATE);
|
||||
const router = useRouter();
|
||||
|
||||
const setSearch = (search: string) => {
|
||||
dispatch({ type: ActionKind.SET_SEARCH, payload: search });
|
||||
router.push('/players');
|
||||
};
|
||||
|
||||
const clearSearch = () => {
|
||||
dispatch({ type: ActionKind.SET_SEARCH, payload: '' });
|
||||
};
|
||||
|
||||
return (
|
||||
<NavSearchContext.Provider
|
||||
value={{ search: state.search, setSearch, clearSearch }}
|
||||
>
|
||||
{children}
|
||||
</NavSearchContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export const useNavSearch = (): NavSearchContextType =>
|
||||
useContext(NavSearchContext);
|
||||
@@ -1,38 +0,0 @@
|
||||
import gql from 'fake-tag';
|
||||
import { Client } from 'urql';
|
||||
|
||||
import {
|
||||
GetGuildsByTextSearchDocument,
|
||||
GetGuildsByTextSearchQuery,
|
||||
GetGuildsByTextSearchQueryVariables,
|
||||
} from './autogen/types';
|
||||
import { client as defaultClient } from './client';
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
gql`
|
||||
query getGuildsByTextSearch($text: String) {
|
||||
search_guilds(args: { search: $text }, limit: 3) {
|
||||
id
|
||||
guildname
|
||||
logo
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const getGuildsByText = async (
|
||||
text: string,
|
||||
client: Client = defaultClient,
|
||||
) => {
|
||||
const { data, error } = await client
|
||||
.query<GetGuildsByTextSearchQuery, GetGuildsByTextSearchQueryVariables>(
|
||||
GetGuildsByTextSearchDocument,
|
||||
{
|
||||
text,
|
||||
},
|
||||
)
|
||||
.toPromise();
|
||||
|
||||
return {
|
||||
guilds: data?.search_guilds || [],
|
||||
error,
|
||||
};
|
||||
};
|
||||
@@ -2,6 +2,9 @@ import gql from 'fake-tag';
|
||||
import { GuildPlayer } from 'graphql/types';
|
||||
|
||||
import {
|
||||
GetCompleteGuildsByTextSearchDocument,
|
||||
GetCompleteGuildsByTextSearchQuery,
|
||||
GetCompleteGuildsByTextSearchQueryVariables,
|
||||
GetGuildMetadataQuery,
|
||||
GetGuildMetadataQueryVariables,
|
||||
GetGuildnamesQuery,
|
||||
@@ -10,6 +13,9 @@ import {
|
||||
GetGuildPlayersQueryVariables,
|
||||
GetGuildQuery,
|
||||
GetGuildQueryVariables,
|
||||
GetGuildsByTextSearchDocument,
|
||||
GetGuildsByTextSearchQuery,
|
||||
GetGuildsByTextSearchQueryVariables,
|
||||
GetGuildsQuery,
|
||||
GetGuildsQueryVariables,
|
||||
GuildFragmentFragment,
|
||||
@@ -165,3 +171,55 @@ export const getGuildPlayers = async (
|
||||
|
||||
return guildPlayers;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
gql`
|
||||
query getGuildsByTextSearch($text: String) {
|
||||
search_guilds(args: { search: $text }, limit: 3) {
|
||||
id
|
||||
guildname
|
||||
logo
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const getGuildsByText = async (text: string) => {
|
||||
const { data, error } = await client
|
||||
.query<GetGuildsByTextSearchQuery, GetGuildsByTextSearchQueryVariables>(
|
||||
GetGuildsByTextSearchDocument,
|
||||
{
|
||||
text,
|
||||
},
|
||||
)
|
||||
.toPromise();
|
||||
|
||||
return {
|
||||
guilds: data?.search_guilds || [],
|
||||
error,
|
||||
};
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
gql`
|
||||
query getCompleteGuildsByTextSearch($text: String) {
|
||||
search_guilds(args: { search: $text }, limit: 50) {
|
||||
...GuildFragment
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const getCompleteGuildsByText = async (text: string) => {
|
||||
const { data, error } = await client
|
||||
.query<
|
||||
GetCompleteGuildsByTextSearchQuery,
|
||||
GetCompleteGuildsByTextSearchQueryVariables
|
||||
>(GetCompleteGuildsByTextSearchDocument, {
|
||||
text,
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
return {
|
||||
guilds: data?.search_guilds || [],
|
||||
error,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -55,17 +55,20 @@
|
||||
"react-icons": "4.2.0",
|
||||
"react-qr-svg": "2.3.0",
|
||||
"react-resizable": "^3.0.4",
|
||||
"react-select": "5.2.1",
|
||||
"react-vis": "^1.11.7",
|
||||
"rss-to-json": "2.0.2",
|
||||
"swr": "1.0.1",
|
||||
"urql": "2.0.2",
|
||||
"use-debounce": "7.0.0",
|
||||
"web3modal": "1.9.4",
|
||||
"sourcecred": "0.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "17.0.6",
|
||||
"@types/react-grid-layout": "^1.1.3",
|
||||
"@types/react-vis": "^1.11.10"
|
||||
"@types/react-vis": "^1.11.10",
|
||||
"@types/react-select": "5.2.1"
|
||||
},
|
||||
"resolutions": {}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import Head from 'next/head';
|
||||
import { WithUrqlProps } from 'next-urql';
|
||||
import React from 'react';
|
||||
|
||||
import { NavSearchContextProvider } from '../contexts/NavSearchContext';
|
||||
import { wrapUrqlClient } from '../graphql/client';
|
||||
|
||||
const App: React.FC<WithUrqlProps> = ({
|
||||
@@ -55,13 +54,11 @@ const App: React.FC<WithUrqlProps> = ({
|
||||
)}
|
||||
</Head>
|
||||
<Web3ContextProvider resetUrqlClient={resetUrqlClient}>
|
||||
<NavSearchContextProvider>
|
||||
<>
|
||||
{!pageProps.hideTopMenu && <MegaMenu />}
|
||||
{!pageProps.hideTopMenu && <PlayerStatsBar />}
|
||||
<Component {...pageProps} />
|
||||
</>
|
||||
</NavSearchContextProvider>
|
||||
<>
|
||||
{!pageProps.hideTopMenu && <MegaMenu />}
|
||||
{!pageProps.hideTopMenu && <PlayerStatsBar />}
|
||||
<Component {...pageProps} />
|
||||
</>
|
||||
</Web3ContextProvider>
|
||||
</ChakraProvider>
|
||||
);
|
||||
|
||||
@@ -17,8 +17,6 @@ import { useOnScreen } from 'lib/hooks/useOnScreen';
|
||||
import { InferGetStaticPropsType } from 'next';
|
||||
import React, { useEffect, useMemo, useRef } from 'react';
|
||||
|
||||
import { useNavSearch } from '../contexts/NavSearchContext';
|
||||
|
||||
type Props = InferGetStaticPropsType<typeof getStaticProps>;
|
||||
|
||||
export const getStaticProps = async () => {
|
||||
@@ -55,15 +53,6 @@ const Players: React.FC<Props> = () => {
|
||||
moreAvailable,
|
||||
} = usePlayerFilter();
|
||||
|
||||
const { search, clearSearch } = useNavSearch();
|
||||
|
||||
useEffect(() => {
|
||||
if (search !== '' && setQueryVariable) {
|
||||
setQueryVariable('search', `%${search}%`);
|
||||
clearSearch();
|
||||
}
|
||||
}, [search, setQueryVariable, clearSearch]);
|
||||
|
||||
const moreRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const onScreen = useOnScreen(moreRef);
|
||||
@@ -127,7 +116,7 @@ type MorePlayersProps = {
|
||||
showSeasonalXP?: boolean;
|
||||
};
|
||||
|
||||
const MorePlayers = React.forwardRef<HTMLDivElement, MorePlayersProps>(
|
||||
export const MorePlayers = React.forwardRef<HTMLDivElement, MorePlayersProps>(
|
||||
({ fetching, totalCount, queryVariables, showSeasonalXP = false }, ref) => {
|
||||
const isTimezoneSelected = useMemo(
|
||||
() => queryVariables.timezones && queryVariables.timezones.length > 0,
|
||||
|
||||
33
packages/web/pages/search/guilds.tsx
Normal file
33
packages/web/pages/search/guilds.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { PageContainer } from 'components/Container';
|
||||
import { GuildList } from 'components/Guild/GuildList';
|
||||
import { HeadComponent } from 'components/Seo';
|
||||
import { GuildFragmentFragment } from 'graphql/autogen/types';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import SearchFilters from '../../components/SearchFilters';
|
||||
import { getCompleteGuildsByText } from '../../graphql/queries/guild';
|
||||
import { GlobalFilters } from '../../utils/GlobalSearch';
|
||||
|
||||
const GuildSearchPage = () => {
|
||||
const { query } = useRouter();
|
||||
const [guilds, setGuilds] = useState<GuildFragmentFragment[]>([]);
|
||||
const search: string = decodeURI(query.q as string);
|
||||
useEffect(() => {
|
||||
if (search) {
|
||||
const getData = async () => {
|
||||
const res = await getCompleteGuildsByText(`%${search}%`);
|
||||
setGuilds(res.guilds);
|
||||
};
|
||||
getData();
|
||||
}
|
||||
}, [search]);
|
||||
return (
|
||||
<PageContainer>
|
||||
<HeadComponent url="https://my.metagame.wtf/community/search" />
|
||||
<SearchFilters activeFilter={GlobalFilters.GUILDS} search={search} />
|
||||
<GuildList guilds={guilds} />
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
export default GuildSearchPage;
|
||||
243
schema.graphql
243
schema.graphql
@@ -206,23 +206,6 @@ type BoxProfile {
|
||||
website: String
|
||||
}
|
||||
|
||||
scalar bpchar
|
||||
|
||||
"""
|
||||
expression to compare columns of type bpchar. All fields are combined with logical 'AND'.
|
||||
"""
|
||||
input bpchar_comparison_exp {
|
||||
_eq: bpchar
|
||||
_gt: bpchar
|
||||
_gte: bpchar
|
||||
_in: [bpchar!]
|
||||
_is_null: Boolean
|
||||
_lt: bpchar
|
||||
_lte: bpchar
|
||||
_neq: bpchar
|
||||
_nin: [bpchar!]
|
||||
}
|
||||
|
||||
type BrightIdStatus {
|
||||
app: String!
|
||||
context: String!
|
||||
@@ -876,7 +859,7 @@ columns and relationships of "guild_metadata"
|
||||
|
||||
"""
|
||||
type guild_metadata {
|
||||
creator_id: uuid!
|
||||
creator_id: uuid
|
||||
|
||||
"""Remote relationship field"""
|
||||
discordRoles: [DiscordRole!]!
|
||||
@@ -891,7 +874,7 @@ type guild_metadata {
|
||||
guild_id: uuid!
|
||||
|
||||
"""An object relationship"""
|
||||
player: player!
|
||||
player: player
|
||||
}
|
||||
|
||||
"""
|
||||
@@ -3937,8 +3920,6 @@ type player {
|
||||
|
||||
"""An object relationship"""
|
||||
profile_cache: profile_cache
|
||||
playerType: player_type
|
||||
player_type_id: Int
|
||||
pronouns: String
|
||||
|
||||
"""An array relationship"""
|
||||
@@ -5976,7 +5957,6 @@ columns and relationships of "PlayerRole"
|
||||
"""
|
||||
type PlayerRole {
|
||||
description: String
|
||||
emoji: bpchar
|
||||
label: String!
|
||||
role: String!
|
||||
}
|
||||
@@ -6023,7 +6003,6 @@ input PlayerRole_bool_exp {
|
||||
_not: PlayerRole_bool_exp
|
||||
_or: [PlayerRole_bool_exp]
|
||||
description: String_comparison_exp
|
||||
emoji: bpchar_comparison_exp
|
||||
label: String_comparison_exp
|
||||
role: String_comparison_exp
|
||||
}
|
||||
@@ -6041,7 +6020,6 @@ input type for inserting data into table "PlayerRole"
|
||||
"""
|
||||
input PlayerRole_insert_input {
|
||||
description: String
|
||||
emoji: bpchar
|
||||
label: String
|
||||
role: String
|
||||
}
|
||||
@@ -6111,7 +6089,6 @@ ordering options when selecting data from "PlayerRole"
|
||||
"""
|
||||
input PlayerRole_order_by {
|
||||
description: order_by
|
||||
emoji: order_by
|
||||
label: order_by
|
||||
role: order_by
|
||||
}
|
||||
@@ -6130,9 +6107,6 @@ enum PlayerRole_select_column {
|
||||
"""column name"""
|
||||
description
|
||||
|
||||
"""column name"""
|
||||
emoji
|
||||
|
||||
"""column name"""
|
||||
label
|
||||
|
||||
@@ -6145,7 +6119,6 @@ input type for updating data in table "PlayerRole"
|
||||
"""
|
||||
input PlayerRole_set_input {
|
||||
description: String
|
||||
emoji: bpchar
|
||||
label: String
|
||||
role: String
|
||||
}
|
||||
@@ -6157,9 +6130,6 @@ enum PlayerRole_update_column {
|
||||
"""column name"""
|
||||
description
|
||||
|
||||
"""column name"""
|
||||
emoji
|
||||
|
||||
"""column name"""
|
||||
label
|
||||
|
||||
@@ -7545,6 +7515,106 @@ type query_root {
|
||||
"""fetch data from the table: "quest_skill" using primary key columns"""
|
||||
quest_skill_by_pk(quest_id: uuid!, skill_id: uuid!): quest_skill
|
||||
|
||||
"""
|
||||
execute function "search_guilds" which returns "guild"
|
||||
"""
|
||||
search_guilds(
|
||||
"""
|
||||
input parameters for function "search_guilds"
|
||||
"""
|
||||
args: search_guilds_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [guild_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [guild_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: guild_bool_exp
|
||||
): [guild!]!
|
||||
|
||||
"""
|
||||
execute function "search_guilds" and query aggregates on result of table type "guild"
|
||||
"""
|
||||
search_guilds_aggregate(
|
||||
"""
|
||||
input parameters for function "search_guilds"
|
||||
"""
|
||||
args: search_guilds_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [guild_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [guild_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: guild_bool_exp
|
||||
): guild_aggregate!
|
||||
|
||||
"""
|
||||
execute function "search_players" which returns "player"
|
||||
"""
|
||||
search_players(
|
||||
"""
|
||||
input parameters for function "search_players"
|
||||
"""
|
||||
args: search_players_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [player_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [player_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: player_bool_exp
|
||||
): [player!]!
|
||||
|
||||
"""
|
||||
execute function "search_players" and query aggregates on result of table type "player"
|
||||
"""
|
||||
search_players_aggregate(
|
||||
"""
|
||||
input parameters for function "search_players"
|
||||
"""
|
||||
args: search_players_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [player_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [player_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: player_bool_exp
|
||||
): player_aggregate!
|
||||
|
||||
"""
|
||||
fetch data from the table: "skill"
|
||||
"""
|
||||
@@ -9176,6 +9246,14 @@ type SaveGuildResponse {
|
||||
success: Boolean
|
||||
}
|
||||
|
||||
input search_guilds_args {
|
||||
search: String
|
||||
}
|
||||
|
||||
input search_players_args {
|
||||
search: String
|
||||
}
|
||||
|
||||
"""
|
||||
columns and relationships of "skill"
|
||||
"""
|
||||
@@ -10662,6 +10740,106 @@ type subscription_root {
|
||||
"""fetch data from the table: "quest_skill" using primary key columns"""
|
||||
quest_skill_by_pk(quest_id: uuid!, skill_id: uuid!): quest_skill
|
||||
|
||||
"""
|
||||
execute function "search_guilds" which returns "guild"
|
||||
"""
|
||||
search_guilds(
|
||||
"""
|
||||
input parameters for function "search_guilds"
|
||||
"""
|
||||
args: search_guilds_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [guild_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [guild_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: guild_bool_exp
|
||||
): [guild!]!
|
||||
|
||||
"""
|
||||
execute function "search_guilds" and query aggregates on result of table type "guild"
|
||||
"""
|
||||
search_guilds_aggregate(
|
||||
"""
|
||||
input parameters for function "search_guilds"
|
||||
"""
|
||||
args: search_guilds_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [guild_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [guild_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: guild_bool_exp
|
||||
): guild_aggregate!
|
||||
|
||||
"""
|
||||
execute function "search_players" which returns "player"
|
||||
"""
|
||||
search_players(
|
||||
"""
|
||||
input parameters for function "search_players"
|
||||
"""
|
||||
args: search_players_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [player_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [player_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: player_bool_exp
|
||||
): [player!]!
|
||||
|
||||
"""
|
||||
execute function "search_players" and query aggregates on result of table type "player"
|
||||
"""
|
||||
search_players_aggregate(
|
||||
"""
|
||||
input parameters for function "search_players"
|
||||
"""
|
||||
args: search_players_args!
|
||||
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [player_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [player_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: player_bool_exp
|
||||
): player_aggregate!
|
||||
|
||||
"""
|
||||
fetch data from the table: "skill"
|
||||
"""
|
||||
@@ -10767,3 +10945,4 @@ input uuid_comparison_exp {
|
||||
_neq: uuid
|
||||
_nin: [uuid!]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user