Leszek Wiesner 3 years ago
parent
commit
b2f3d36e36

+ 5 - 5
cli/src/QueryNodeApi.ts

@@ -21,9 +21,9 @@ import {
   GetDataObjectsByVideoId,
   GetDataObjectsByVideoIdQuery,
   GetDataObjectsByVideoIdQueryVariables,
-  GetDataObjectsChannelId,
-  GetDataObjectsChannelIdQuery,
-  GetDataObjectsChannelIdQueryVariables,
+  GetDataObjectsByChannelId,
+  GetDataObjectsByChannelIdQuery,
+  GetDataObjectsByChannelIdQueryVariables,
 } from './graphql/generated/queries'
 import { URL } from 'url'
 import fetch from 'cross-fetch'
@@ -89,8 +89,8 @@ export default class QueryNodeApi {
   }
 
   async dataObjectsByChannelId(channelId: string): Promise<DataObjectInfoFragment[]> {
-    return this.multipleEntitiesQuery<GetDataObjectsChannelIdQuery, GetDataObjectsChannelIdQueryVariables>(
-      GetDataObjectsChannelId,
+    return this.multipleEntitiesQuery<GetDataObjectsByChannelIdQuery, GetDataObjectsByChannelIdQueryVariables>(
+      GetDataObjectsByChannelId,
       { channelId },
       'storageDataObjects'
     )

+ 4 - 4
cli/src/graphql/generated/queries.ts

@@ -30,11 +30,11 @@ export type GetDataObjectsByBagIdQueryVariables = Types.Exact<{
 
 export type GetDataObjectsByBagIdQuery = { storageDataObjects: Array<DataObjectInfoFragment> }
 
-export type GetDataObjectsChannelIdQueryVariables = Types.Exact<{
+export type GetDataObjectsByChannelIdQueryVariables = Types.Exact<{
   channelId?: Types.Maybe<Types.Scalars['ID']>
 }>
 
-export type GetDataObjectsChannelIdQuery = { storageDataObjects: Array<DataObjectInfoFragment> }
+export type GetDataObjectsByChannelIdQuery = { storageDataObjects: Array<DataObjectInfoFragment> }
 
 export type GetDataObjectsByVideoIdQueryVariables = Types.Exact<{
   videoId?: Types.Maybe<Types.Scalars['ID']>
@@ -102,8 +102,8 @@ export const GetDataObjectsByBagId = gql`
   }
   ${DataObjectInfo}
 `
-export const GetDataObjectsChannelId = gql`
-  query getDataObjectsChannelId($channelId: ID) {
+export const GetDataObjectsByChannelId = gql`
+  query getDataObjectsByChannelId($channelId: ID) {
     storageDataObjects(where: { type_json: { channelId_eq: $channelId } }) {
       ...DataObjectInfo
     }

+ 1 - 1
cli/src/graphql/queries/storage.graphql

@@ -52,7 +52,7 @@ query getDataObjectsByBagId($bagId: ID) {
   }
 }
 
-query getDataObjectsChannelId($channelId: ID) {
+query getDataObjectsByChannelId($channelId: ID) {
   storageDataObjects(where: { type_json: { channelId_eq: $channelId } }) {
     ...DataObjectInfo
   }