antelopeql 1.1.0 → 1.1.1
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.
|
@@ -85,33 +85,35 @@ export default function build_graphql_fields_from_abis(abi_list) {
|
|
|
85
85
|
name
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
name
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
if (Object.keys(query_fields).length)
|
|
89
|
+
contract_query_fields[name] = {
|
|
90
|
+
name,
|
|
91
|
+
type: new GraphQLObjectType({
|
|
92
|
+
name: name + "_query",
|
|
93
|
+
fields: query_fields
|
|
94
|
+
}),
|
|
95
|
+
resolve(__, _, { network: { rpc_url, fetch } = {} }, { fieldName }) {
|
|
96
|
+
if (!fetch)
|
|
97
|
+
throw new GraphQLError(
|
|
98
|
+
"No fetch argument found on the context of the GraphQL.execute."
|
|
99
|
+
);
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
if (!rpc_url)
|
|
102
|
+
throw new GraphQLError(
|
|
103
|
+
"No rpc_url argument found on the context of the GraphQL.execute."
|
|
104
|
+
);
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
return { code: fieldName.replace(/_/gmu, ".") };
|
|
107
|
+
}
|
|
108
|
+
};
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
if (Object.keys(mutation_fields).length)
|
|
111
|
+
contract_mutation_fields[name] = {
|
|
112
|
+
type: new GraphQLInputObjectType({
|
|
113
|
+
name,
|
|
114
|
+
fields: mutation_fields
|
|
115
|
+
})
|
|
116
|
+
};
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antelopeql",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "A GraphQL implementation for interacting with Antelope based blockchains.",
|
|
5
5
|
"repository": "github:pur3miish/antelopeql",
|
|
6
6
|
"bugs": "https://github.com/pur3miish/antelopeql/issues",
|