import { gql } from "apollo-boost";
export const GET_MODS = gql`
query tokens($id: String!, $token: String!) {
tokens(where: { metaId: $token, resolveOwner: $id }) {
export const GET_ALL_STORES = gql`
query stores($more: Int!) {
stores(first: $more, where: { burned: false }) {
export const GET_STORES = gql`
query user($id: String!, $approver: String!) {
stores(where: { burned: false, owner: $id }) {
approvers(id: $approver) {
export const GET_STORE = gql`
query store($id: String!) {
store(id: $id, where: { burned: false }) {
things(where: { burned: false }) {
// Simply remove metaId if you just want to know if a user owns a single token
export const HAS_THING_FROM_STORE = gql`
query tokens($ownerId: String!, $metaId: String!, $storeId: String!) {
where: { metaId: $metaId, store: $storeId, resolveOwner: $ownerId }
export const GET_STORE_BASIC = gql`
query store($id: String!, $approver: String!) {
store(id: $id, where: { burned: false }) {
approvers(id: $approver) {
export const GET_ONE_STORE = gql`
query store($id: String!) {
store(id: $id, where: { burned: false }) {
things(where: { burned: false }) {
export const GET_USER_TOKENS = gql`
query tokens($userId: String!, $store: String!) {
tokens(where: { resolveOwner: $userId, store: $store, burned: false }) {
export const GET_THINGS = gql`
query store($id: String!) {
things(where: { burned: false }) {
export const HAS_THING = gql`
query store($ownerId: String!, $metaId: String!) {
tokens(where: { resolveOwner: $ownerId, metaId: $metaId }) {
export const GET_THING = gql`
query thing($metaId: String!) {
export const GET_USER_THINGS = gql`
query user($account: String!) {
export const GET_USER_STORE = gql`
query getStore($id: String!) {
stores(where: { burned: false }) {