Skip to content

Releases: MichalLytek/typegraphql-prisma

0.18.3

22 Dec 17:18
Compare
Choose a tag to compare
0.18.3 Pre-release
Pre-release

Changelog

  1. The supported Prisma version has been bumped to v3.7.0.

  2. It is now possible to provide custom prisma import path in generator option (#184).

    generator typegraphql {
      provider               = "typegraphql-prisma"
      customPrismaImportPath = "../client"
    }

    This might be useful, especially in a multi-Prisma client scenario.
    Be aware that the path is treated as a relative path to the output folder of typegraphql-prisma generator.

0.18.2

08 Dec 15:21
Compare
Choose a tag to compare
0.18.2 Pre-release
Pre-release

Changelog

  1. The model's _count field for selecting relations count has been changed back to nullable: true.
    This should fix compatibility issues between generated types and custom resolvers (#204).
    In the next releases, there will be more config options, e.g. to hide that field completely or restore the non-nullable behavior.

  2. There was an issue with the Prisma @ignore attribute on some relation fields (#218).
    It has been fixed, so that now the generator does not emit relation resolvers for those ignored fields.

0.18.1

30 Nov 17:42
Compare
Choose a tag to compare
0.18.1 Pre-release
Pre-release

Changelog

  1. This release bump Prisma version requirement to ~3.6.0. You can expect two new fields (in and notIn) in BytesNullableFilter.
  2. Small issues with applying additional decorators has been fixed again (#210).
  3. Be aware that the new extendedIndexes preview feature might not work correctly yet.

0.18.0

24 Nov 15:45
Compare
Choose a tag to compare
0.18.0 Pre-release
Pre-release

Changelog

  1. In this release, in order to make the output of the generator smaller in size, it sets importHelpers: true TypeScript compiler option.
    This way it imports decorator helpers from the tslib package instead of creating them from scratch in every file.

    (0, tslib_1.__decorate)([
        TypeGraphQL.Field(_type => CreatorWhereInput_1.CreatorWhereInput, {
            nullable: true
        }),
        (0, tslib_1.__metadata)("design:type", CreatorWhereInput_1.CreatorWhereInput)
    ], ProblemLikedByArgs.prototype, "where", void 0);

    And because of that, you need to install the tslib package, if you don't use it already 😉

  2. Previously, the applyResolversEnhanceMap feature was incorrectly applying additional decorators, causing issues with property descriptor not working properly (#210).
    The generated enhancements file now uses the helpers from the tslib package, so it should be working correctly now 💪

      for (const typeFieldName of configFieldsToApply) {
        const fieldDecorators = enhanceConfig.fields[typeFieldName]!;
    -   for (const fieldDecorator of fieldDecorators) {
    -     fieldDecorator(typePrototype, typeFieldName);
    -   }
    +   tslib.__decorate(fieldDecorators, typePrototype, typeFieldName);
     }

0.17.0

17 Nov 14:49
Compare
Choose a tag to compare
0.17.0 Pre-release
Pre-release

Changelog

  1. Supported Prisma version has been updated to v3.5.0.

  2. Because of the changes in DMMF, the relation count field is now non-nullable:

      @TypeGraphQL.Field(_type => UserCount, {
    -   nullable: true
    +   nullable: false
      })
    - _count?: UserCount | null;
    + _count: UserCount;
  3. In the previous release, for fullTextSearch feature flag, there was introduced a new feature "Order by relevance in full text search" in DMMF. With Prisma v3.5.0, it is now available in runtime.
    This release fixes some minor issue related to not applying model renaming on the new OrderByRelevanceField enum 💪

0.16.6

10 Nov 15:14
Compare
Choose a tag to compare
0.16.6 Pre-release
Pre-release

Changelog

  1. This release only fixes a small issue related to JS bundlers that do minification (#156).
    Sometimes they mangle the names of classes, so that you receive an error like Schema must contain uniquely named types but contains multiple types named "c".

    It has been fixed by providing the type name as the decorator option, so that even if the JS class name will be changed, TypeGraphQL can still use proper type name:

    - @TypeGraphQL.ObjectType({
    + @TypeGraphQL.ObjectType("Category", {
        isAbstract: true
      })
      export class Category {
        // ..
      }

    Be aware of that changes in your generated code. It should not affect on anything.

0.16.5

03 Nov 12:07
Compare
Choose a tag to compare
0.16.5 Pre-release
Pre-release

Changelog

  1. The supported Prisma version has been bumped to v3.4.0.
    Changes in DMMF were only made for the fullTextSearch preview feature, so changes in generated code blocks are only scoped to usage of that flag.

  2. The issue with sometimes failing Prisma.Decimal scalar serialization (#201) has been fixed 💪

0.16.4

28 Oct 16:35
Compare
Choose a tag to compare
0.16.4 Pre-release
Pre-release

Changelog

  1. In previous releases, when the multiline documentation was added to Prisma schema:

    model MyTable {
      /// Line1
      /// Line2
      id String @id
    }

    It was generating description string consisting of concatenated lines:

    @TypeGraphQL.Field(_type => String, {
      description: "Line1Line2"
    })

    Now the wrong behavior has been fixed, and the line breaks are properly kept 💪

    @TypeGraphQL.Field(_type => String, {
      description:  "Line1\nLine2"
    })

    The same goes to JS docs lines:

    /**
     * Line1
     * Line2
     */
    @TypeGraphQL.Field(_type => String, {
      nullable: false,
      description: description:  "Line1\nLine2"
    })

0.16.3

20 Oct 10:05
Compare
Choose a tag to compare
0.16.3 Pre-release
Pre-release

Changelog

  1. The supported Prisma version has been bumped to v3.3.0.
    There were no changes in DMMF thus no changes in generated code blocks this time.

  2. Previously introduced emitOnly generator option had a hidden bug, when you wanted to generate only models without crudResolvers - the _count field was still generated and the generated code contained an import for a not generated output type.
    The error has been fixed and you should be able to use it without any issues 💪

0.16.2

06 Oct 16:42
Compare
Choose a tag to compare
0.16.2 Pre-release
Pre-release

Changelog

  1. The supported Prisma version has been bumped to v3.2.0 💪
    There were no changes in DMMF thus no changes in generated code blocks this time.

  2. It is now possible to prevent generating a full CRUD API with all resolvers, arguments, inputs, outputs, models, etc.
    Thanks to a new emitOnly generator option, the generator will emit only the parts that you're interested in, like models and inputs but without outputs or resolvers:

    generator typegraphql {
      provider = "typegraphql-prisma"
      emitOnly = "models,inputs"
    }

    More detailed info about this feature available in docs:
    https://prisma.typegraphql.com/docs/advanced/emit-blocks/