@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.
Files changed (56) hide show
  1. package/examples/basic-event-handlers/node_modules/keccak/build/Makefile +1 -1
  2. package/examples/basic-event-handlers/node_modules/keccak/build/Release/.deps/Release/obj.target/keccak/src/addon.o.d.raw +16 -16
  3. package/examples/basic-event-handlers/node_modules/keccak/build/config.gypi +4 -4
  4. package/examples/basic-event-handlers/node_modules/keccak/build/keccak.target.mk +14 -14
  5. package/examples/basic-event-handlers/node_modules/websocket/build/Makefile +1 -1
  6. package/examples/basic-event-handlers/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw +16 -16
  7. package/examples/basic-event-handlers/node_modules/websocket/build/bufferutil.target.mk +14 -14
  8. package/examples/basic-event-handlers/node_modules/websocket/build/config.gypi +1 -1
  9. package/examples/basic-event-handlers/node_modules/websocket/build/validation.target.mk +14 -14
  10. package/examples/basic-event-handlers/package.json +1 -1
  11. package/examples/basic-event-handlers/yarn.lock +4 -4
  12. package/examples/example-subgraph/package.json +1 -1
  13. package/examples/example-subgraph/yarn.lock +4 -4
  14. package/package.json +1 -1
  15. package/resources/test/docker-compose.yml +4 -2
  16. package/src/codegen/schema.js +3 -44
  17. package/src/codegen/schema.test.js +0 -6
  18. package/src/codegen/types/conversions.js +19 -19
  19. package/src/codegen/types/index.js +0 -25
  20. package/src/codegen/types/index.test.js +0 -22
  21. package/src/commands/deploy.js +0 -5
  22. package/src/commands/init.js +1 -0
  23. package/src/migrations/mapping_api_version_0_0_5.js +1 -1
  24. package/src/migrations/mapping_api_version_0_0_6.js +74 -0
  25. package/src/migrations/spec_version_0_0_2.js +1 -1
  26. package/src/migrations/spec_version_0_0_3.js +29 -0
  27. package/src/migrations/spec_version_0_0_4.js +25 -0
  28. package/src/migrations.js +4 -0
  29. package/src/protocols/ethereum/manifest.graphql +2 -0
  30. package/src/protocols/index.js +2 -2
  31. package/src/scaffold/index.js +1 -1
  32. package/src/validation/manifest.js +64 -12
  33. package/tests/cli/init/ethereum/from-example/.gitattributes +1 -0
  34. package/tests/cli/init/ethereum/from-example/LICENSE +21 -0
  35. package/tests/cli/init/ethereum/from-example/README.md +3 -0
  36. package/tests/cli/init/ethereum/from-example/abis/Gravity.json +1 -0
  37. package/tests/cli/init/ethereum/from-example/bin/Counter.bin +1 -0
  38. package/tests/cli/init/ethereum/from-example/contracts/Gravity.sol +63 -0
  39. package/tests/cli/init/ethereum/from-example/contracts/Migrations.sol +23 -0
  40. package/tests/cli/init/ethereum/from-example/docker-compose.yml +39 -0
  41. package/tests/cli/init/ethereum/from-example/migrations/1_initial_migration.js +5 -0
  42. package/tests/cli/init/ethereum/from-example/migrations/2_deploy_contract.js +5 -0
  43. package/tests/cli/init/ethereum/from-example/migrations/3_create_gravatars.js +15 -0
  44. package/tests/cli/init/ethereum/from-example/networks.json +7 -0
  45. package/tests/cli/init/ethereum/from-example/package.json +23 -0
  46. package/tests/cli/init/ethereum/from-example/schema.graphql +6 -0
  47. package/tests/cli/init/ethereum/from-example/src/mapping.ts +22 -0
  48. package/tests/cli/init/ethereum/from-example/subgraph.yaml +27 -0
  49. package/tests/cli/init/ethereum/from-example/truffle.js +27 -0
  50. package/tests/cli/init/ethereum/from-example/yarn.lock +5977 -0
  51. package/tests/cli/validation/conflicting-protocol-names/Abi.json +7 -0
  52. package/tests/cli/validation/conflicting-protocol-names/mapping.ts +0 -0
  53. package/tests/cli/validation/conflicting-protocol-names/schema.graphql +3 -0
  54. package/tests/cli/validation/conflicting-protocol-names/subgraph.yaml +41 -0
  55. package/tests/cli/validation/conflicting-protocol-names.stderr +10 -0
  56. package/tests/cli/validation.test.js +9 -0
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "event",
4
+ "name": "ExampleEvent",
5
+ "inputs": [{ "type": "string" }]
6
+ }
7
+ ]
@@ -0,0 +1,3 @@
1
+ type MyEntity @entity {
2
+ id: ID!
3
+ }
@@ -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'],