rune
Version:
CLI to upload your games to Rune
37 lines (36 loc) • 715 B
JavaScript
import { useQuery, gql } from "@apollo/client/index.js";
import { GamesDocument } from "../generated/types.js";
export function useGames({ skip, } = {}) {
const { data, ...rest } = useQuery(GamesDocument, {
skip,
});
return {
games: data?.games?.nodes,
gamesLoading: rest.loading,
};
}
gql `
query Games {
games {
nodes {
id
title
description
gameDevs {
nodes {
userId
displayName
type
}
}
gameVersions(orderBy: [PRIMARY_KEY_DESC]) {
nodes {
gameId
gameVersionId
status
}
}
}
}
}
`;