@graphprotocol/graph-cli 0.29.0 → 0.30.0-alpha.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.
- package/examples/basic-event-handlers/node_modules/keccak/build/Makefile +1 -1
- package/examples/basic-event-handlers/node_modules/keccak/build/Release/.deps/Release/obj.target/keccak/src/addon.o.d.raw +16 -16
- package/examples/basic-event-handlers/node_modules/keccak/build/config.gypi +4 -4
- package/examples/basic-event-handlers/node_modules/keccak/build/keccak.target.mk +14 -14
- package/examples/basic-event-handlers/node_modules/websocket/build/Makefile +1 -1
- package/examples/basic-event-handlers/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw +16 -16
- package/examples/basic-event-handlers/node_modules/websocket/build/bufferutil.target.mk +14 -14
- package/examples/basic-event-handlers/node_modules/websocket/build/config.gypi +1 -1
- package/examples/basic-event-handlers/node_modules/websocket/build/validation.target.mk +14 -14
- package/examples/basic-event-handlers/package.json +1 -1
- package/examples/basic-event-handlers/yarn.lock +4 -4
- package/examples/example-subgraph/package.json +1 -1
- package/examples/example-subgraph/yarn.lock +4 -4
- package/package.json +1 -1
- package/resources/test/docker-compose.yml +4 -2
- package/src/codegen/schema.js +3 -44
- package/src/codegen/schema.test.js +0 -6
- package/src/codegen/types/conversions.js +19 -19
- package/src/codegen/types/index.js +0 -25
- package/src/codegen/types/index.test.js +0 -22
- package/src/commands/deploy.js +0 -5
- package/src/commands/init.js +1 -0
- package/src/migrations/mapping_api_version_0_0_5.js +1 -1
- package/src/migrations/mapping_api_version_0_0_6.js +74 -0
- package/src/migrations/spec_version_0_0_2.js +1 -1
- package/src/migrations/spec_version_0_0_3.js +29 -0
- package/src/migrations/spec_version_0_0_4.js +25 -0
- package/src/migrations.js +4 -0
- package/src/protocols/ethereum/manifest.graphql +2 -0
- package/src/protocols/index.js +2 -2
- package/src/scaffold/index.js +1 -1
- package/src/validation/manifest.js +64 -12
- package/tests/cli/init/ethereum/from-example/.gitattributes +1 -0
- package/tests/cli/init/ethereum/from-example/LICENSE +21 -0
- package/tests/cli/init/ethereum/from-example/README.md +3 -0
- package/tests/cli/init/ethereum/from-example/abis/Gravity.json +1 -0
- package/tests/cli/init/ethereum/from-example/bin/Counter.bin +1 -0
- package/tests/cli/init/ethereum/from-example/contracts/Gravity.sol +63 -0
- package/tests/cli/init/ethereum/from-example/contracts/Migrations.sol +23 -0
- package/tests/cli/init/ethereum/from-example/docker-compose.yml +39 -0
- package/tests/cli/init/ethereum/from-example/migrations/1_initial_migration.js +5 -0
- package/tests/cli/init/ethereum/from-example/migrations/2_deploy_contract.js +5 -0
- package/tests/cli/init/ethereum/from-example/migrations/3_create_gravatars.js +15 -0
- package/tests/cli/init/ethereum/from-example/networks.json +7 -0
- package/tests/cli/init/ethereum/from-example/package.json +23 -0
- package/tests/cli/init/ethereum/from-example/schema.graphql +6 -0
- package/tests/cli/init/ethereum/from-example/src/mapping.ts +22 -0
- package/tests/cli/init/ethereum/from-example/subgraph.yaml +27 -0
- package/tests/cli/init/ethereum/from-example/truffle.js +27 -0
- package/tests/cli/init/ethereum/from-example/yarn.lock +5977 -0
- package/tests/cli/validation/conflicting-protocol-names/Abi.json +7 -0
- package/tests/cli/validation/conflicting-protocol-names/mapping.ts +0 -0
- package/tests/cli/validation/conflicting-protocol-names/schema.graphql +3 -0
- package/tests/cli/validation/conflicting-protocol-names/subgraph.yaml +41 -0
- package/tests/cli/validation/conflicting-protocol-names.stderr +10 -0
- package/tests/cli/validation.test.js +9 -0
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
specVersion: 0.0.1
|
|
2
|
+
schema:
|
|
3
|
+
file: ./schema.graphql
|
|
4
|
+
dataSources:
|
|
5
|
+
- kind: ethereum/contract
|
|
6
|
+
name: ExampleSubgraph
|
|
7
|
+
network: mainnet
|
|
8
|
+
source:
|
|
9
|
+
address: 22843e74c59580b3eaf6c233fa67d8b7c561a835
|
|
10
|
+
abi: ExampleContract
|
|
11
|
+
mapping:
|
|
12
|
+
kind: ethereum/events
|
|
13
|
+
apiVersion: 0.0.5
|
|
14
|
+
language: wasm/assemblyscript
|
|
15
|
+
file: ./mapping.ts
|
|
16
|
+
entities:
|
|
17
|
+
- ExampleEntity
|
|
18
|
+
abis:
|
|
19
|
+
- name: ExampleContract
|
|
20
|
+
file: ./Abi.json
|
|
21
|
+
eventHandlers:
|
|
22
|
+
- event: ExampleEvent(string)
|
|
23
|
+
handler: handleExampleEvent
|
|
24
|
+
templates:
|
|
25
|
+
- kind: near
|
|
26
|
+
name: ExampleTemplate
|
|
27
|
+
source:
|
|
28
|
+
abi: ExampleContract
|
|
29
|
+
mapping:
|
|
30
|
+
kind: ethereum/events
|
|
31
|
+
apiVersion: 0.0.5
|
|
32
|
+
language: wasm/assemblyscript
|
|
33
|
+
file: ./mapping.ts
|
|
34
|
+
entities:
|
|
35
|
+
- ExampleEntity
|
|
36
|
+
abis:
|
|
37
|
+
- name: ExampleContract
|
|
38
|
+
file: ./Abi.json
|
|
39
|
+
eventHandlers:
|
|
40
|
+
- event: ExampleEvent(string)
|
|
41
|
+
handler: handleExampleEvent
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
- Load subgraph from subgraph.yaml
|
|
2
|
+
✖ Failed to load subgraph from subgraph.yaml: Error in subgraph.yaml:
|
|
3
|
+
|
|
4
|
+
Path: /
|
|
5
|
+
Conflicting protocol kinds used in data sources and templates:
|
|
6
|
+
Data sources and templates using 'ethereum':
|
|
7
|
+
- ExampleSubgraph
|
|
8
|
+
Data sources and templates using 'near':
|
|
9
|
+
- ExampleTemplate
|
|
10
|
+
Recommendation: Make all data sources and templates use the same protocol kind.
|
|
@@ -205,6 +205,15 @@ describe('Validation', () => {
|
|
|
205
205
|
},
|
|
206
206
|
)
|
|
207
207
|
|
|
208
|
+
cliTest(
|
|
209
|
+
'Conflicting protocol names',
|
|
210
|
+
['codegen', '--skip-migrations'],
|
|
211
|
+
'validation/conflicting-protocol-names',
|
|
212
|
+
{
|
|
213
|
+
exitCode: 1,
|
|
214
|
+
},
|
|
215
|
+
)
|
|
216
|
+
|
|
208
217
|
cliTest(
|
|
209
218
|
'Invalid @fulltext directive',
|
|
210
219
|
['codegen', '--skip-migrations'],
|