Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subqery _metadata query #17

Merged
merged 7 commits into from
Oct 16, 2024
Merged

Support subqery _metadata query #17

merged 7 commits into from
Oct 16, 2024

Conversation

yoozo
Copy link
Collaborator

@yoozo yoozo commented Sep 25, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

Copy link

github-actions bot commented Sep 25, 2024

Coverage report for .

Caution

Test run failed

St.
Category Percentage Covered / Total
🟡 Statements
74.08% (+3.98% 🔼)
1618/2184
🟡 Branches
76.86% (-1.44% 🔻)
176/229
🟡 Functions
77.55% (+15.05% 🔼)
38/49
🟡 Lines
74.08% (+3.98% 🔼)
1618/2184
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / graphile.config.ts
100% 33.33% 100% 100%
🟢 config/index.ts 100% 100% 100% 100%
🟢 config/yargs.ts 100% 100% 100% 100%
🔴 index.ts 0% 0% 0% 0%
🟡
... / GetMetadataPlugin.ts
61.86% 100% 50% 61.86%
🔴
... / GetSubqueryMetadataPlugin.ts
53.93% 100% 40% 53.93%
🟢
... / OffsetToSkipPlugin.ts
100% 100% 100% 100%
🟢
... / PgIdToNodeIdPlugin.ts
92% 80% 100% 92%
🟢
... / PgRowByVirtualIdPlugin.ts
91.44% 62.07% 100% 91.44%
🔴
... / ArgFilterAttributesPlugin.ts
46.47% 86.67% 100% 46.47%
🟡
... / ArgFilterBackwardRelationsPlugin.ts
67.84% 79.17% 80% 67.84%
🟢
... / ArgFilterLogicalOperatorsPlugin.ts
85.71% 87.5% 100% 85.71%
🟡
... / ArgFilterPlugin.ts
77.93% 75% 100% 77.93%
🟢
... / OrderByAttributesPlugin.ts
86.32% 82.14% 100% 86.32%
🔴
... / interface.ts
0% 0% 0% 0%
🟡
... / utils.ts
74.09% 65.71% 100% 74.09%
🟢
... / PgBlockHeightPlugin.ts
88.32% 84.85% 71.43% 88.32%
🟢
... / index.ts
100% 100% 100% 100%
🔴
... / utils.ts
44.44% 100% 0% 44.44%
🟢
... / smartTagsPlugin.ts
100% 100% 100% 100%
🟡 server.ts 75% 66.67% 100% 75%

Test suite run failed

Failed tests: 25/25. Failed suites: 1/1.
  ● subgraph plugin test › _meta plugin › query _meta

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › Equal

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › Not equal

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › gte

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › gt

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › lte

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › lt

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › in

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › not_in

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › Contains

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › Not contains

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › Contains nocase

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › Not contains nocase

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › ends_with

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › not_ends_with

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › starts_with

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › not_starts_with

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › ends_with_nocase

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › not_ends_with_nocase

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › starts_with_nocase

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › filter plugin › not_starts_with_nocase

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › order plugin › order by firstTransferBlock asc

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › order plugin › order by firstTransferBlock desc

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › block height plugin › block height

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

  ● subgraph plugin test › subqery _metadata query › block height

    Unexpected token '<', "<!DOCTYPE "... is not valid JSON

      at new ApolloError (node_modules/@apollo/client/errors/ApolloError.js:29:27)
      at node_modules/@apollo/client/core/QueryManager.js:489:17
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:15:61
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:15:1)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/apollo-client.cjs.js:572:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/apollo-client.cjs.js:572:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:37:14)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/link/http/createHttpLink.js:97:20

Report generated by 🧪jest coverage report action from 29300f7

Copy link

@stwiname stwiname left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like theres some unused code that can be removed too

@@ -29,6 +29,7 @@ type MetaEntry = { key: string; value: MetaType };

export function CreateMetadataPlugin(schemaName: string) {
return makeExtendSchemaPlugin((build) => {
// TODO Only handled the single-chain scenario, multi-chains may have unexpected results.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the current behaviour? I think its probably fine we dont support it but also we should provide an appropriate error if we don't

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, only single-chain projects are supported, and if it is a multi-chain project, an error will be returned.

}
});

// TODO How to check if the field should be returned.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant you use row?

const { rows } = await pgClient.query({
text: `select value, key from "${schemaName}"."${tableName}"`,
});
const result: any = {};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const result: any = {};
const result: Record<string, unknown> = {};

Comment on lines 12 to 13
// eslint-disable-next-line @typescript-eslint/no-misused-promises
() => runAsyncInterval(cb, interval, intervalIndex),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-misused-promises
() => runAsyncInterval(cb, interval, intervalIndex),
() => void runAsyncInterval(cb, interval, intervalIndex),

@yoozo yoozo merged commit fd61eb0 into main Oct 16, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants