diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a45fa5ef..e04ccf93 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -41,9 +41,6 @@ jobs: key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - - - name: Install Python dependencies - run: sudo apt-get install python3-distutils - name: Install dependencies and build run: pnpm install --frozen-lockfile diff --git a/packages/devtools/src/schema/parser.ts b/packages/devtools/src/schema/parser.ts index 48e6222a..7651c6de 100644 --- a/packages/devtools/src/schema/parser.ts +++ b/packages/devtools/src/schema/parser.ts @@ -288,10 +288,7 @@ export class SchemaParser { immutableFields: Array.from( new Set( Object.keys(object.properties) - .filter((key) => { - const property = object.properties[key]; - return property.immutable === true || ('item' in property && property.item && property.item.immutable) - }) + .filter((key) => object.properties[key].immutable === true) .concat(inheritedImmutableFields), ), ), @@ -328,7 +325,7 @@ export class SchemaParser { for (const [key, value] of Object.entries(objectFields)) { const directives = getDirectives(this.#schema, value) - + const immutable = directives.some((item) => item.name === 'immutable') const [innerType, required] = isNonNullType(value.type) ? [value.type.ofType, true] : [value.type, false] @@ -347,6 +344,7 @@ export class SchemaParser { key, innerType, required, + immutable, directives, hasCreateModel, ) @@ -520,6 +518,7 @@ export class SchemaParser { fieldName: string, type: GraphQLList, required: boolean, + immutable: boolean, directives: Array, hasCreateModel: boolean, ): DefinitionWithReferences { @@ -537,6 +536,7 @@ export class SchemaParser { const definition: ListFieldDefinition = { type: 'list', required, + immutable, item: item.definition, maxLength: list.args.maxLength as number, } diff --git a/packages/runtime/test/__snapshots__/runtime.test.ts.snap b/packages/runtime/test/__snapshots__/runtime.test.ts.snap index 2ed3af16..e492f65b 100644 --- a/packages/runtime/test/__snapshots__/runtime.test.ts.snap +++ b/packages/runtime/test/__snapshots__/runtime.test.ts.snap @@ -291,7 +291,6 @@ type Favorite implements Node { tag: String! note: String docID: CeramicStreamID! - extra: String doc: Node } @@ -454,7 +453,6 @@ input FavoriteInput { tag: String! note: String docID: CeramicStreamID! - extra: String } input SetOptionsInput { @@ -1810,7 +1808,6 @@ scalar CeramicCommitID @specifiedBy(url: "https://cips.ceramic.network/CIPs/cip- input PartialPostInput { date: DateTime text: String - testList: [String] } type EnableIndexingPostPayload {