Accounts/NoMeteorQueries

Accounts/NoMeteorQueries

Source:

Query functions that do not import or use any Meteor packages or globals. These can be used both by Meteor methods or publications, and by GraphQL resolvers.

Methods

(static) group(context, id) → {Object}

query the Groups collection and return group data

Source:
Parameters:
Name Type Description
context Object

an object containing the per-request state

id String

id of group to query

Returns:

group object

Type
Object

(static) groups(context, shopId) → {Object}

query the Groups collection and return a MongoDB cursor

Source:
Parameters:
Name Type Description
context Object

an object containing the per-request state

shopId String

shop ID to get groups for

Returns:

Groups collection cursor

Type
Object

(static) roles(context, shopId) → {Object}

query the Shops collection, filter over packages, and return available roles data

Source:
Parameters:
Name Type Description
context Object

an object containing the per-request state

shopId String

ID of Shop to query

Returns:

roles object Promise

Type
Object

(static) shopAdministrators(context, id) → {Array.<Object>}

return Account object for all users who are "owner" or "admin" role for the shop

Source:
Parameters:
Name Type Description
context Object

an object containing the per-request state

id String

ID of shop

Returns:

Array of user account objects

Type
Array.<Object>

(static) userAccount(context, id) → {Object}

query the Accounts collection and return user account data

Source:
Parameters:
Name Type Description
context Object

an object containing the per-request state

id String

id of user to query

Returns:

user account object

Type
Object