Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
f705a4f
New translations subgraph-debug-forking.mdx (Chinese Simplified)
benface Mar 4, 2022
50d7ff3
New translations migrating-subgraph.mdx (Chinese Simplified)
benface Mar 4, 2022
dc96202
New translations multisig.mdx (Chinese Simplified)
benface Mar 4, 2022
726df8a
New translations index.json (Japanese)
benface Mar 5, 2022
688dac1
New translations create-subgraph-hosted.mdx (Spanish)
benface Mar 10, 2022
66a8425
New translations create-subgraph-hosted.mdx (Arabic)
benface Mar 10, 2022
daa41ac
New translations create-subgraph-hosted.mdx (Japanese)
benface Mar 10, 2022
ab2920f
New translations create-subgraph-hosted.mdx (Korean)
benface Mar 10, 2022
77d5533
New translations create-subgraph-hosted.mdx (Chinese Simplified)
benface Mar 10, 2022
1758af7
New translations create-subgraph-hosted.mdx (Vietnamese)
benface Mar 10, 2022
f9b39b2
New translations create-subgraph-hosted.mdx (Chinese Simplified)
benface Mar 11, 2022
2d54a97
New translations create-subgraph-hosted.mdx (Vietnamese)
benface Mar 11, 2022
edc1eac
New translations create-subgraph-hosted.mdx (Japanese)
benface Mar 11, 2022
a92d8ab
New translations create-subgraph-hosted.mdx (Korean)
benface Mar 11, 2022
20e5c18
New translations create-subgraph-hosted.mdx (Arabic)
benface Mar 11, 2022
a921b6e
New translations assemblyscript-api.mdx (Spanish)
benface Mar 11, 2022
4d2d358
New translations assemblyscript-api.mdx (Arabic)
benface Mar 11, 2022
548e8f2
New translations create-subgraph-hosted.mdx (Spanish)
benface Mar 11, 2022
fbb6203
New translations assemblyscript-api.mdx (Japanese)
benface Mar 11, 2022
64a08bd
New translations assemblyscript-api.mdx (Korean)
benface Mar 11, 2022
0f182ee
New translations assemblyscript-api.mdx (Chinese Simplified)
benface Mar 11, 2022
24d6190
New translations assemblyscript-api.mdx (Vietnamese)
benface Mar 11, 2022
ef29105
New translations assemblyscript-migration-guide.mdx (Spanish)
benface Mar 11, 2022
6325920
New translations assemblyscript-migration-guide.mdx (Arabic)
benface Mar 11, 2022
f9c8275
New translations assemblyscript-migration-guide.mdx (Japanese)
benface Mar 11, 2022
a470e37
New translations assemblyscript-migration-guide.mdx (Korean)
benface Mar 11, 2022
a44fa0c
New translations assemblyscript-migration-guide.mdx (Chinese Simplified)
benface Mar 11, 2022
6127e1e
New translations assemblyscript-migration-guide.mdx (Vietnamese)
benface Mar 11, 2022
cc1f178
New translations subgraph-debug-forking.mdx (Spanish)
benface Mar 11, 2022
31e4130
New translations subgraph-debug-forking.mdx (Arabic)
benface Mar 11, 2022
1beced0
New translations subgraph-debug-forking.mdx (Japanese)
benface Mar 11, 2022
87d1ecc
New translations graphql-api.mdx (Spanish)
benface Mar 11, 2022
5514540
New translations graphql-api.mdx (Arabic)
benface Mar 11, 2022
ac5823c
New translations graphql-api.mdx (Japanese)
benface Mar 11, 2022
694d099
New translations graphql-api.mdx (Korean)
benface Mar 11, 2022
c09fabd
New translations graphql-api.mdx (Chinese Simplified)
benface Mar 11, 2022
9b2c144
New translations graphql-api.mdx (Vietnamese)
benface Mar 11, 2022
cb7a649
New translations matchstick.mdx (Chinese Simplified)
benface Mar 11, 2022
2a7ce58
New translations studio-faq.mdx (Japanese)
benface Mar 11, 2022
09bc02d
New translations subgraph-studio.mdx (Spanish)
benface Mar 11, 2022
6e0b1ca
New translations subgraph-studio.mdx (Arabic)
benface Mar 11, 2022
62b4733
New translations subgraph-studio.mdx (Japanese)
benface Mar 11, 2022
c13d315
New translations subgraph-studio.mdx (Korean)
benface Mar 11, 2022
3fe28fb
New translations subgraph-studio.mdx (Chinese Simplified)
benface Mar 11, 2022
fee2953
New translations deploy-subgraph-studio.mdx (Arabic)
benface Mar 11, 2022
92866a9
New translations billing.mdx (Vietnamese)
benface Mar 11, 2022
6fe4e12
New translations migrating-subgraph.mdx (Spanish)
benface Mar 11, 2022
060d540
New translations migrating-subgraph.mdx (Arabic)
benface Mar 11, 2022
974af55
New translations migrating-subgraph.mdx (Japanese)
benface Mar 11, 2022
8f37f3c
New translations migrating-subgraph.mdx (Korean)
benface Mar 11, 2022
995d37e
New translations migrating-subgraph.mdx (Vietnamese)
benface Mar 11, 2022
7785a4d
New translations billing.mdx (Chinese Simplified)
benface Mar 11, 2022
6154c43
New translations what-is-hosted-service.mdx (Spanish)
benface Mar 11, 2022
b50ab04
New translations what-is-hosted-service.mdx (Arabic)
benface Mar 11, 2022
0053e62
New translations what-is-hosted-service.mdx (Japanese)
benface Mar 11, 2022
cc80d69
New translations what-is-hosted-service.mdx (Korean)
benface Mar 11, 2022
d9967b0
New translations what-is-hosted-service.mdx (Chinese Simplified)
benface Mar 11, 2022
6f34c39
New translations what-is-hosted-service.mdx (Vietnamese)
benface Mar 11, 2022
e40be19
New translations billing.mdx (Spanish)
benface Mar 11, 2022
83014c2
New translations billing.mdx (Arabic)
benface Mar 11, 2022
4a61ea7
New translations billing.mdx (Japanese)
benface Mar 11, 2022
a7e1432
New translations billing.mdx (Korean)
benface Mar 11, 2022
fb2dd35
New translations subgraph-studio.mdx (Vietnamese)
benface Mar 11, 2022
b7366f7
New translations index.json (Spanish)
benface Mar 11, 2022
a6f2b66
New translations indexing.mdx (Korean)
benface Mar 11, 2022
1bf6cb6
New translations indexing.mdx (Chinese Simplified)
benface Mar 11, 2022
df98975
New translations indexing.mdx (Vietnamese)
benface Mar 11, 2022
c2d1347
New translations indexing.mdx (Arabic)
benface Mar 11, 2022
7f5facd
New translations index.json (Japanese)
benface Mar 11, 2022
4049ff4
New translations index.json (Korean)
benface Mar 11, 2022
035dffe
New translations index.json (Vietnamese)
benface Mar 11, 2022
2b23a36
New translations transferring-subgraph-ownership.mdx (Spanish)
benface Mar 11, 2022
9b3b2f2
New translations transferring-subgraph-ownership.mdx (Arabic)
benface Mar 11, 2022
22f8781
New translations transferring-subgraph-ownership.mdx (Japanese)
benface Mar 11, 2022
95af554
New translations transferring-subgraph-ownership.mdx (Korean)
benface Mar 11, 2022
a15ca11
New translations transferring-subgraph-ownership.mdx (Chinese Simplif…
benface Mar 11, 2022
700bf8d
New translations indexing.mdx (Japanese)
benface Mar 11, 2022
14ee6d4
New translations indexing.mdx (Spanish)
benface Mar 11, 2022
2254817
New translations near.mdx (Arabic)
benface Mar 11, 2022
d3d1808
New translations curating.mdx (Vietnamese)
benface Mar 11, 2022
88ea57f
New translations near.mdx (Chinese Simplified)
benface Mar 11, 2022
5759990
New translations curating.mdx (Spanish)
benface Mar 11, 2022
bf29e4a
New translations curating.mdx (Arabic)
benface Mar 11, 2022
1440bb5
New translations curating.mdx (Japanese)
benface Mar 11, 2022
92bcebc
New translations curating.mdx (Korean)
benface Mar 11, 2022
6822095
New translations curating.mdx (Chinese Simplified)
benface Mar 11, 2022
8a3cda5
New translations delegating.mdx (Spanish)
benface Mar 11, 2022
c9cd45b
New translations explorer.mdx (Vietnamese)
benface Mar 11, 2022
81bdf8a
New translations delegating.mdx (Arabic)
benface Mar 11, 2022
60811ed
New translations delegating.mdx (Japanese)
benface Mar 11, 2022
74729b1
New translations delegating.mdx (Korean)
benface Mar 11, 2022
de07f71
New translations delegating.mdx (Chinese Simplified)
benface Mar 11, 2022
75c43c6
New translations delegating.mdx (Vietnamese)
benface Mar 11, 2022
48ea96b
New translations explorer.mdx (Spanish)
benface Mar 11, 2022
9c08d7d
New translations explorer.mdx (Arabic)
benface Mar 11, 2022
91b643f
New translations explorer.mdx (Japanese)
benface Mar 11, 2022
99f8d59
New translations explorer.mdx (Korean)
benface Mar 11, 2022
697b257
New translations explorer.mdx (Chinese Simplified)
benface Mar 11, 2022
caa20c4
New translations transferring-subgraph-ownership.mdx (Vietnamese)
benface Mar 11, 2022
4906ff8
New translations introduction.mdx (Japanese)
benface Mar 12, 2022
5a33ad0
New translations create-subgraph-hosted.mdx (Japanese)
benface Mar 12, 2022
52e501c
New translations curating.mdx (Japanese)
benface Mar 12, 2022
c476be4
New translations transferring-subgraph-ownership.mdx (Japanese)
benface Mar 12, 2022
268438c
New translations matchstick.mdx (Spanish)
benface Mar 14, 2022
713af87
New translations matchstick.mdx (Arabic)
benface Mar 14, 2022
62d36be
New translations matchstick.mdx (Japanese)
benface Mar 14, 2022
885e3cb
New translations matchstick.mdx (Korean)
benface Mar 14, 2022
c4af701
New translations matchstick.mdx (Chinese Simplified)
benface Mar 14, 2022
1ef417e
New translations matchstick.mdx (Vietnamese)
benface Mar 14, 2022
ba993b7
New translations create-subgraph-hosted.mdx (Spanish)
benface Mar 15, 2022
a43d1fb
New translations matchstick.mdx (Spanish)
benface Mar 16, 2022
22b1d8a
New translations matchstick.mdx (Japanese)
benface Mar 16, 2022
616e539
New translations transferring-subgraph-ownership.mdx (Spanish)
benface Mar 16, 2022
a4f6398
New translations index.json (Spanish)
benface Mar 18, 2022
aff0cb7
New translations assemblyscript-migration-guide.mdx (Spanish)
benface Mar 22, 2022
95f6532
New translations assemblyscript-migration-guide.mdx (Arabic)
benface Mar 22, 2022
31ee1e5
New translations assemblyscript-migration-guide.mdx (Japanese)
benface Mar 22, 2022
8f7b593
New translations assemblyscript-migration-guide.mdx (Korean)
benface Mar 22, 2022
59ceba3
New translations assemblyscript-migration-guide.mdx (Chinese Simplified)
benface Mar 22, 2022
3399154
New translations assemblyscript-migration-guide.mdx (Vietnamese)
benface Mar 22, 2022
f2ecc30
New translations subgraph-studio.mdx (Spanish)
benface Mar 22, 2022
c9bf2a7
New translations subgraph-studio.mdx (Arabic)
benface Mar 22, 2022
2aeda2a
New translations subgraph-studio.mdx (Japanese)
benface Mar 22, 2022
c1cd4a2
New translations subgraph-studio.mdx (Korean)
benface Mar 22, 2022
62823cd
New translations subgraph-studio.mdx (Chinese Simplified)
benface Mar 22, 2022
34f127c
New translations subgraph-studio.mdx (Vietnamese)
benface Mar 22, 2022
7b05052
New translations assemblyscript-migration-guide.mdx (Japanese)
benface Mar 24, 2022
da16389
New translations subgraph-studio.mdx (Japanese)
benface Mar 24, 2022
61e6eca
New translations matchstick.mdx (Spanish)
benface Apr 13, 2022
edf0855
New translations matchstick.mdx (Arabic)
benface Apr 13, 2022
773f3c9
New translations matchstick.mdx (Japanese)
benface Apr 13, 2022
4254aca
New translations matchstick.mdx (Korean)
benface Apr 13, 2022
ea24453
New translations matchstick.mdx (Chinese Simplified)
benface Apr 13, 2022
c0f4cdb
New translations matchstick.mdx (Vietnamese)
benface Apr 13, 2022
64019d5
New translations assemblyscript-api.mdx (Spanish)
benface Apr 19, 2022
0ca56e5
New translations assemblyscript-migration-guide.mdx (Korean)
benface Apr 19, 2022
442e21a
New translations assemblyscript-migration-guide.mdx (Vietnamese)
benface Apr 19, 2022
488b003
New translations assemblyscript-api.mdx (Vietnamese)
benface Apr 19, 2022
80e5c02
New translations create-subgraph-hosted.mdx (Chinese Simplified)
benface Apr 19, 2022
f8a8f7a
New translations assemblyscript-migration-guide.mdx (Chinese Simplified)
benface Apr 19, 2022
03e3376
New translations assemblyscript-api.mdx (Chinese Simplified)
benface Apr 19, 2022
a5d5cfc
New translations create-subgraph-hosted.mdx (Korean)
benface Apr 19, 2022
a7eddf1
New translations assemblyscript-api.mdx (Korean)
benface Apr 19, 2022
5a8d928
New translations assemblyscript-migration-guide.mdx (Spanish)
benface Apr 19, 2022
16651ab
New translations create-subgraph-hosted.mdx (Japanese)
benface Apr 19, 2022
23c108f
New translations assemblyscript-migration-guide.mdx (Japanese)
benface Apr 19, 2022
07a84bb
New translations assemblyscript-api.mdx (Japanese)
benface Apr 19, 2022
9c289da
New translations create-subgraph-hosted.mdx (Arabic)
benface Apr 19, 2022
bf89add
New translations assemblyscript-migration-guide.mdx (Arabic)
benface Apr 19, 2022
2999dfa
New translations assemblyscript-api.mdx (Arabic)
benface Apr 19, 2022
4792e02
New translations create-subgraph-hosted.mdx (Spanish)
benface Apr 19, 2022
76303f5
New translations create-subgraph-hosted.mdx (Vietnamese)
benface Apr 19, 2022
d4e660b
Run Prettier
benface Apr 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 107 additions & 93 deletions pages/ar/developer/assemblyscript-api.mdx

Large diffs are not rendered by default.

54 changes: 43 additions & 11 deletions pages/ar/developer/assemblyscript-migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ value.y = 'content'

```graphql
type Total @entity {
id: ID!
id: Bytes!
amount: BigInt
}
```
Expand Down Expand Up @@ -398,7 +398,7 @@ total.tokens = total.tokens + BigInt.fromI32(1)

```graphql
type Total @entity {
id: ID!
id: Bytes!
amount: BigInt!
}
```
Expand Down Expand Up @@ -449,37 +449,69 @@ export class Something {
}
```

### مخطط GraphQL
### Array initialization

هذا ليس تغييرا مباشرا ل AssemblyScript ، ولكن قد تحتاج إلى تحديث ملف `schema.graphql` الخاص بك.
The `Array` class still accepts a number to initialize the length of the list, however you should take care because operations like `.push` will actually increase the size instead of adding to the beginning, for example:

الآن لم يعد بإمكانك تعريف الحقول في الأنواع الخاصة بك والتي هي قوائم Non-Nullable. إذا كان لديك مخطط مثل هذا:
```typescript
let arr = new Array<string>(5) // ["", "", "", "", ""]

arr.push('something') // ["", "", "", "", "", "something"] // size 6 :(
```

Depending on the types you're using, eg nullable ones, and how you're accessing them, you might encounter a runtime error like this one:

```
ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - <unknown>!~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - <unknown>!~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - <unknown>!node_modules/@graphprotocol/graph-ts/global/global/id_of_type
```

To actually push at the beginning you should either, initialize the `Array` with size zero, like this:

```typescript
let arr = new Array<string>(0) // []

arr.push('something') // ["something"]
```

Or you should mutate it via index:

```typescript
let arr = new Array<string>(5) // ["", "", "", "", ""]

arr[0] = 'something' // ["something", "", "", "", ""]
```

### GraphQL schema

This is not a direct AssemblyScript change, but you may have to update your `schema.graphql` file.

Now you no longer can define fields in your types that are Non-Nullable Lists. If you have a schema like this:

```graphql
type Something @entity {
id: ID!
id: Bytes!
}

type MyEntity @entity {
id: ID!
id: Bytes!
invalidField: [Something]! # no longer valid
}
```

سيتعين عليك إضافة `!` لعضو من نوع القائمة ، مثل هذا:
You'll have to add an `!` to the member of the List type, like this:

```graphql
type Something @entity {
id: ID!
id: Bytes!
}

type MyEntity @entity {
id: ID!
id: Bytes!
invalidField: [Something!]! # valid
}
```

هذا التغير بسبب اختلافات ال nullability بين إصدارات AssemblyScript وهو مرتبط بملف`src/generated/schema.ts` (هذا هو المسار الافتراضي ، وربما تكون قد غيرت هذا).
This changed because of nullability differences between AssemblyScript versions, and it's related to the `src/generated/schema.ts` file (default path, you might have changed this).

### آخر

Expand Down
217 changes: 110 additions & 107 deletions pages/ar/developer/create-subgraph-hosted.mdx

Large diffs are not rendered by default.

Loading