@solana/rpc-graphql 2.0.0-experimental.f8c941c → 2.0.0-experimental.fbbf6ba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.cjs +5 -6
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +5 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.native.js +5 -6
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +5 -6
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +5 -6
- package/dist/index.node.js.map +1 -1
- package/dist/types/context.d.ts +0 -1
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/loaders/account.d.ts +1 -2
- package/dist/types/loaders/account.d.ts.map +1 -1
- package/dist/types/loaders/block.d.ts +1 -2
- package/dist/types/loaders/block.d.ts.map +1 -1
- package/dist/types/loaders/loader.d.ts +4 -4
- package/dist/types/loaders/loader.d.ts.map +1 -1
- package/dist/types/loaders/program-accounts.d.ts +1 -2
- package/dist/types/loaders/program-accounts.d.ts.map +1 -1
- package/dist/types/loaders/transaction.d.ts +1 -2
- package/dist/types/loaders/transaction.d.ts.map +1 -1
- package/package.json +9 -37
package/dist/index.browser.cjs
CHANGED
|
@@ -72,7 +72,7 @@ function applyDefaultArgs2({
|
|
|
72
72
|
async function loadBlock(rpc, { slot, ...config }) {
|
|
73
73
|
return await rpc.getBlock(
|
|
74
74
|
slot,
|
|
75
|
-
// @ts-expect-error FIX ME: https://github.com/
|
|
75
|
+
// @ts-expect-error FIX ME: https://github.com/microsoft/TypeScript/issues/43187
|
|
76
76
|
config
|
|
77
77
|
).send();
|
|
78
78
|
}
|
|
@@ -108,7 +108,7 @@ function applyDefaultArgs3({
|
|
|
108
108
|
async function loadProgramAccounts(rpc, { programAddress, ...config }) {
|
|
109
109
|
return await rpc.getProgramAccounts(
|
|
110
110
|
programAddress,
|
|
111
|
-
// @ts-expect-error FIX ME: https://github.com/
|
|
111
|
+
// @ts-expect-error FIX ME: https://github.com/microsoft/TypeScript/issues/43187
|
|
112
112
|
config
|
|
113
113
|
).send();
|
|
114
114
|
}
|
|
@@ -140,7 +140,7 @@ function applyDefaultArgs4({
|
|
|
140
140
|
async function loadTransaction(rpc, { signature, ...config }) {
|
|
141
141
|
return await rpc.getTransaction(
|
|
142
142
|
signature,
|
|
143
|
-
// @ts-expect-error FIX ME: https://github.com/
|
|
143
|
+
// @ts-expect-error FIX ME: https://github.com/microsoft/TypeScript/issues/43187
|
|
144
144
|
config
|
|
145
145
|
).send();
|
|
146
146
|
}
|
|
@@ -167,8 +167,7 @@ function createSolanaGraphQLContext(rpc) {
|
|
|
167
167
|
block: createBlockLoader(rpc),
|
|
168
168
|
programAccounts: createProgramAccountsLoader(rpc),
|
|
169
169
|
transaction: createTransactionLoader(rpc)
|
|
170
|
-
}
|
|
171
|
-
rpc
|
|
170
|
+
}
|
|
172
171
|
};
|
|
173
172
|
}
|
|
174
173
|
|
|
@@ -2901,13 +2900,13 @@ function createSolanaGraphQLTypeDefs() {
|
|
|
2901
2900
|
|
|
2902
2901
|
// src/index.ts
|
|
2903
2902
|
function createRpcGraphQL(rpc) {
|
|
2904
|
-
const contextValue = createSolanaGraphQLContext(rpc);
|
|
2905
2903
|
const schema$1 = schema.makeExecutableSchema({
|
|
2906
2904
|
resolvers: createSolanaGraphQLResolvers(),
|
|
2907
2905
|
typeDefs: createSolanaGraphQLTypeDefs()
|
|
2908
2906
|
});
|
|
2909
2907
|
return {
|
|
2910
2908
|
async query(source, variableValues) {
|
|
2909
|
+
const contextValue = createSolanaGraphQLContext(rpc);
|
|
2911
2910
|
return graphql.graphql({
|
|
2912
2911
|
contextValue,
|
|
2913
2912
|
schema: schema$1,
|