add opnames for all queries
This commit is contained in:
parent
c7707c8ee5
commit
b47392f17f
5 changed files with 15 additions and 6 deletions
|
@ -104,7 +104,7 @@ function SubmitPetForm() {
|
||||||
|
|
||||||
const [loadPet, { loading }] = useLazyQuery(
|
const [loadPet, { loading }] = useLazyQuery(
|
||||||
gql`
|
gql`
|
||||||
query($petName: String!) {
|
query SubmitPetForm($petName: String!) {
|
||||||
petOnNeopetsDotCom(petName: $petName) {
|
petOnNeopetsDotCom(petName: $petName) {
|
||||||
color {
|
color {
|
||||||
id
|
id
|
||||||
|
|
|
@ -210,7 +210,12 @@ function useSearchResults(query, outfitState) {
|
||||||
fetchMore: fetchMoreGQL,
|
fetchMore: fetchMoreGQL,
|
||||||
} = useQuery(
|
} = useQuery(
|
||||||
gql`
|
gql`
|
||||||
query($query: String!, $speciesId: ID!, $colorId: ID!, $offset: Int!) {
|
query SearchPanel(
|
||||||
|
$query: String!
|
||||||
|
$speciesId: ID!
|
||||||
|
$colorId: ID!
|
||||||
|
$offset: Int!
|
||||||
|
) {
|
||||||
itemSearchToFit(
|
itemSearchToFit(
|
||||||
query: $query
|
query: $query
|
||||||
speciesId: $speciesId
|
speciesId: $speciesId
|
||||||
|
|
|
@ -19,7 +19,7 @@ function SpeciesColorPicker({
|
||||||
onChange,
|
onChange,
|
||||||
}) {
|
}) {
|
||||||
const { loading: loadingMeta, error: errorMeta, data: meta } = useQuery(gql`
|
const { loading: loadingMeta, error: errorMeta, data: meta } = useQuery(gql`
|
||||||
query {
|
query SpeciesColorPicker {
|
||||||
allSpecies {
|
allSpecies {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default function useOutfitAppearance(outfitState) {
|
||||||
|
|
||||||
const { loading, error, data } = useQuery(
|
const { loading, error, data } = useQuery(
|
||||||
gql`
|
gql`
|
||||||
query(
|
query OutfitAppearance(
|
||||||
$wornItemIds: [ID!]!
|
$wornItemIds: [ID!]!
|
||||||
$speciesId: ID!
|
$speciesId: ID!
|
||||||
$colorId: ID!
|
$colorId: ID!
|
||||||
|
|
|
@ -25,7 +25,7 @@ function useOutfitState() {
|
||||||
const allItemIds = [...state.wornItemIds, ...state.closetedItemIds];
|
const allItemIds = [...state.wornItemIds, ...state.closetedItemIds];
|
||||||
const { loading, error, data } = useQuery(
|
const { loading, error, data } = useQuery(
|
||||||
gql`
|
gql`
|
||||||
query($allItemIds: [ID!]!, $speciesId: ID!, $colorId: ID!) {
|
query OutfitState($allItemIds: [ID!]!, $speciesId: ID!, $colorId: ID!) {
|
||||||
items(ids: $allItemIds) {
|
items(ids: $allItemIds) {
|
||||||
# TODO: De-dupe this from SearchPanel?
|
# TODO: De-dupe this from SearchPanel?
|
||||||
id
|
id
|
||||||
|
@ -198,7 +198,11 @@ function findItemConflicts(itemIdToAdd, state, apolloClient) {
|
||||||
|
|
||||||
const { items } = apolloClient.readQuery({
|
const { items } = apolloClient.readQuery({
|
||||||
query: gql`
|
query: gql`
|
||||||
query($itemIds: [ID!]!, $speciesId: ID!, $colorId: ID!) {
|
query OutfitStateItemConflicts(
|
||||||
|
$itemIds: [ID!]!
|
||||||
|
$speciesId: ID!
|
||||||
|
$colorId: ID!
|
||||||
|
) {
|
||||||
items(ids: $itemIds) {
|
items(ids: $itemIds) {
|
||||||
id
|
id
|
||||||
appearanceOn(speciesId: $speciesId, colorId: $colorId) {
|
appearanceOn(speciesId: $speciesId, colorId: $colorId) {
|
||||||
|
|
Loading…
Reference in a new issue