npm package diff
Package: @forge/storage
Versions: 1.6.0 - 1.7.0-next.0
File: package/out/gql-queries.js
Index: package/out/gql-queries.js
===================================================================
--- package/out/gql-queries.js
+++ package/out/gql-queries.js
@@ -1,24 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomEntityQueries = exports.UntypedQueries = void 0;
class UntypedQueries {
- static get = (contextAri, key, encrypted) => ({
+ static get = (key, encrypted) => ({
query: `
- query forge_app_getApplicationStorageEntity($contextAri: ID!, $key: ID!, $encrypted: Boolean!) {
- appStoredEntity(contextAri: $contextAri, key: $key, encrypted: $encrypted) {
+ query forge_app_getApplicationStorageEntity($key: ID!, $encrypted: Boolean!) {
+ appStoredEntity(key: $key, encrypted: $encrypted) {
key
value
}
}
`,
variables: {
- contextAri,
key,
encrypted
}
});
- static set = (contextAri, key, value, encrypted) => ({
+ static set = (key, value, encrypted) => ({
query: `
mutation forge_app_setApplicationStorageEntity($input: SetAppStoredEntityMutationInput!) {
appStorage{
setAppStoredEntity(input: $input) {
@@ -36,16 +35,15 @@
}
`,
variables: {
input: {
- contextAri,
key,
value,
encrypted
}
}
});
- static delete = (contextAri, key, encrypted) => ({
+ static delete = (key, encrypted) => ({
query: `
mutation forge_app_deleteApplicationStorageEntity($input: DeleteAppStoredEntityMutationInput!) {
appStorage {
deleteAppStoredEntity(input: $input) {
@@ -63,18 +61,17 @@
}
`,
variables: {
input: {
- contextAri,
key,
encrypted
}
}
});
- static listQuery = (contextAri, options) => ({
+ static listQuery = (options) => ({
query: `
- query forge_app_getApplicationStorageEntities($contextAri: ID!, $where: [AppStoredEntityFilter!], $cursor: String, $limit: Int) {
- appStoredEntities(contextAri: $contextAri, where: $where, after: $cursor, first: $limit) {
+ query forge_app_getApplicationStorageEntities($where: [AppStoredEntityFilter!], $cursor: String, $limit: Int) {
+ appStoredEntities(where: $where, after: $cursor, first: $limit) {
edges {
node {
value
key
@@ -85,18 +82,17 @@
}
}
`,
variables: {
- contextAri,
where: options.where ?? null,
cursor: options.cursor ?? null,
limit: options.limit ?? null
}
});
- static listQueryForCleanup = (contextAri, options) => ({
+ static listQueryForCleanup = (options) => ({
query: `
- query forge_app_getApplicationStorageEntitiesForCleanup($contextAri: ID!, $where: [AppStoredEntityFilter!], $cursor: String, $limit: Int) {
- appStoredEntitiesForCleanup(contextAri: $contextAri, where: $where, after: $cursor, first: $limit) {
+ query forge_app_getApplicationStorageEntitiesForCleanup($where: [AppStoredEntityFilter!], $cursor: String, $limit: Int) {
+ appStoredEntitiesForCleanup(where: $where, after: $cursor, first: $limit) {
edges {
node {
value
key
@@ -107,34 +103,32 @@
}
}
`,
variables: {
- contextAri,
where: options.where ?? null,
cursor: options.cursor ?? null,
limit: options.limit ?? null
}
});
}
exports.UntypedQueries = UntypedQueries;
class CustomEntityQueries {
- static get = (contextAri, entityName, key) => ({
+ static get = (entityName, key) => ({
query: `
- query forge_app_getApplicationStorageCustomEntity ($contextAri: ID!, $key: ID!, $entityName: String!) {
- appStoredCustomEntity(contextAri: $contextAri, key: $key, entityName: $entityName) {
+ query forge_app_getApplicationStorageCustomEntity ($key: ID!, $entityName: String!) {
+ appStoredCustomEntity(key: $key, entityName: $entityName) {
value
entityName
key
}
}
`,
variables: {
- contextAri,
entityName,
key
}
});
- static set = (contextAri, entityName, key, value) => ({
+ static set = (entityName, key, value) => ({
query: `
mutation forge_app_setApplicationStorageCustomEntity($input: SetAppStoredCustomEntityMutationInput!) {
appStorageCustomEntity{
setAppStoredCustomEntity(input: $input) {
@@ -152,16 +146,15 @@
}
`,
variables: {
input: {
- contextAri,
entityName,
key,
value
}
}
});
- static delete = (contextAri, entityName, key) => ({
+ static delete = (entityName, key) => ({
query: `
mutation forge_app_deleteApplicationStorageCustomEntity($input: DeleteAppStoredCustomEntityMutationInput!) {
appStorageCustomEntity {
deleteAppStoredCustomEntity(input: $input) {
@@ -179,19 +172,18 @@
}
`,
variables: {
input: {
- contextAri,
entityName,
key
}
}
});
- static listQuery = (contextAri, options) => {
+ static listQuery = (options) => {
return {
query: `
- query AppStorageCustomEntityQueries ($contextAri: ID!, $entityName: String!, $indexName: String!, $range: AppStoredCustomEntityRange, $filters: AppStoredCustomEntityFilters, $sort:SortOrder, $limit: Int, $cursor: String, $partition: [AppStoredCustomEntityFieldValue!]) {
- appStoredCustomEntities(contextAri: $contextAri, entityName: $entityName, indexName: $indexName, range: $range, filters: $filters, sort:$sort, limit: $limit, cursor: $cursor, partition: $partition) {
+ query AppStorageCustomEntityQueries ($entityName: String!, $indexName: String!, $range: AppStoredCustomEntityRange, $filters: AppStoredCustomEntityFilters, $sort:SortOrder, $limit: Int, $cursor: String, $partition: [AppStoredCustomEntityFieldValue!]) {
+ appStoredCustomEntities(entityName: $entityName, indexName: $indexName, range: $range, filters: $filters, sort:$sort, limit: $limit, cursor: $cursor, partition: $partition) {
edges {
node {
key
value
@@ -207,9 +199,8 @@
}
}
`,
variables: {
- contextAri,
entityName: options.entityName,
indexName: options.indexName,
range: options.range,
...(options.filters && options.filters.length