Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Towards release 1.0 #623

Closed
MichalLytek opened this issue May 3, 2020 · 22 comments
Closed

Towards release 1.0 #623

MichalLytek opened this issue May 3, 2020 · 22 comments
Labels
Community 👨‍👧 Something initiated by a community Solved ✔️ The issue has been solved
Projects
Milestone

Comments

@MichalLytek
Copy link
Owner

MichalLytek commented May 3, 2020

Today, I released the first Release Candidate version of major 1.0.0 🎉
https://www.npmjs.com/package/type-graphql/v/1.0.0-rc.1
It is also distributed as a new major version on the default latest tag.

This release contains a lot of breaking changes, so please read the release notes carefully 👀
https://github.com/MichalLytek/type-graphql/releases/tag/v1.0.0-rc.1

The 1.0.0 milestone is finished in 97% - it contains of 87 closed issues! 😵
https://github.com/MichalLytek/type-graphql/milestone/3
The work that has to be also done before final release is to write the announcement post about the 1.0.0 release, after 2 years of developing TypeGraphQL ☺️

Feel free to update your apps and let me know how the new version works for you and what improvements you would like to see in the upcoming 1.0.0 release!

And don't forget to support the project as its ongoing development is possible only thanks to the support by the community ❤️

Especially if you are using it commercially - just to ensure that the project which your product relies on is actively maintained and improved 💪

@MichalLytek MichalLytek added Community 👨‍👧 Something initiated by a community Help Wanted 🆘 Extra attention is needed labels May 3, 2020
@adamovittorio

This comment has been minimized.

@MichalLytek

This comment has been minimized.

@MichalLytek MichalLytek changed the title Towards 1.0.0 release Towards release 1.0 May 4, 2020
@ujwal-setlur
Copy link

@MichalLytek I upgraded, and everything worked just fine for me. I had been on the 0.18 beta releases. Great work!

I guess graphql-15.0.0 is now supported? I thought that was some ways off...good to see!

@smolinari
Copy link
Contributor

Awesome stuff! Keep up the great work!

Scott

@MichalLytek MichalLytek added this to Backlog in Board via automation May 10, 2020
@MichalLytek MichalLytek added this to the 1.0.0 release milestone May 10, 2020
@MichalLytek MichalLytek moved this from Backlog to In progress in Board May 10, 2020
@jeromemeichelbeck
Copy link

Awesome, will try it on my current project!

@MichalLytek
Copy link
Owner Author

Yesterday, v1.0.0-rc.2 has been released 🚀
It contains 2 last-minute fixes but also 2 small features:
https://github.com/MichalLytek/type-graphql/releases/tag/v1.0.0-rc.2

Please give the v1.0.0 RC release a try and feel free to report some bugs or lacking important features - this way we can improve the things before final 1.0 release 😉

@rchl

This comment has been minimized.

@MichalLytek

This comment has been minimized.

@rchl

This comment has been minimized.

@MichalLytek

This comment has been minimized.

@rchl

This comment has been minimized.

@robhogan

This comment has been minimized.

@jeromeSH26
Copy link

jeromeSH26 commented Jun 14, 2020

hi,
have upgrade to rc2 today, as well as graphql V15.0.0 and graphql-tools 6.0.9.
I lost some inheritance in the @interfacetype. For example some typeorm entites were extending a base entity with a column "id".
Compiling was ok but at run time I got an error Interface: [interface] expects “fieldname” but [type] does not provide it.
I change the interfaces and type definition to add the missing field and it worked ok.

Don't know if this issue is related to rc2 or to the graphql V15.0.0

Good job anyway, thks a lot

@MichalLytek
Copy link
Owner Author

@jeromeSH26 please isolate the issue and create a minimal reproducible code example

@jeromeSH26
Copy link

jeromeSH26 commented Jun 14, 2020

here is a simplifed example (most of the interfaces and objects are in different files, I have put then all together for the example)

import { InterfaceType, Field, ID, ObjectType } from "type-graphql";
import { BaseEntity, Column, Index, Generated, Entity, PrimaryColumn } from "typeorm";

export interface IBasicEntityId {
	id: string;
};

@InterfaceType()
export abstract class GqlBasicId implements IBasicEntityId  {
	@Field(() => ID, { nullable: false })
	id: string;
};

export interface ITheEntity extends IBasicEntityId {
	field1: string;
	field2: boolean;
};

@InterfaceType()
export abstract class GqlTheEntity extends GqlBasicId
	implements ITheEntity{
       // uncommenting the next  2 lines fix the issue. But in v0.17.6 and graphql 14.6.0 no need these 2 lines. Inheritance was ok
	// @Field(() => ID, { nullable: false }) 
	// id: string; 
	@Field({ nullable: false })
	field1: string;
	@Field(() => Boolean, { nullable: true })
	field2: boolean;
	};

// typeorm defs
export class MyBaseEntity extends BaseEntity {
	@Column()
	@Index()
	@Generated("uuid")
	id: string;
};

//final objects

@ObjectType({ implements: GqlTheEntity })
@Entity({
	name: "test",
})
export class TheEntity extends MyBaseEntity
	implements ITheEntity{
	@PrimaryColumn({
		type: "character varying",
		length: 20,
		nullable: false,
		default: "",
	})
	field1: string;

       @Column({
		type: "bool",
		nullable: false,
		default: true,
	})
	field2: boolean;
};

error :
Interface field GqlTheEntity .id expected but TheEntity does not provide it.

@MichalLytek
Copy link
Owner Author

MichalLytek commented Jun 15, 2020

@jeromemeichelbeck Looks like it might be related to #373 and I don't have an idea how to solve that issue properly 😕

@jeromeSH26
Copy link

maybe, but it's weird because it was working fine before. I will try to downgrade graphql and/or type-graphql to find which one create this regression.

it's not a big deal however although it reduces the scope of inheritance for large or shared librairies.

@mqdeandrade
Copy link

Going from RC2 to RC3 uncovered some hidden errors in my entity definitions that took a bit of head scratching to find. I had defined a field as @Field(_type => Payment, { nullable: true }) with a typeorm OneToMany and a field resolver defined as @FieldResolver(_returns => [Payment]). The error is pretty obvious when you look at them side by side but it was working happily on RC2. Going to RC3 threw a 'non-nullable field can't be null error' when querying the parent entity. The fix was simply removing the @field as per the docs because the @FieldResolver was doing the job anyway, although I could have just defined the _type as [Payment] as well which would have worked too.

@MichalLytek
Copy link
Owner Author

MichalLytek commented Jul 28, 2020

@mqdeandrade Thanks for sharing this info.
As stated in the release notes, RC3 has removed the legacy array inference, so now explicit array syntax ([Item]) is required. The first releases didn't support the array [Item] syntax, only isArray: true option, so now I'm just removing the old deprecated, not used in docs approach as a part of cleaning before the 1.0.0 release.

@ofbeaton
Copy link

graphql-subscriptions which type-graphql v1-rc3 relies on does not support graphql v15.

Fresh "type-graphql": "^1.0.0-rc.3" with graphql v15 "graphql": "^15.3.0",

I get a warning npm WARN graphql-subscriptions@1.1.0 requires a peer of graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.

They have an open issue for graphl v15 support from April 2nd, still unresolved. apollographql/graphql-subscriptions#221

Perhaps type-graphql should stick with graphql v14 for now? Or can I safely ignore this warning?

@MichalLytek
Copy link
Owner Author

MichalLytek commented Aug 14, 2020

@ofbeaton Yes, you can safely ignore this warning - breaking changes in v15 were really small and minor, all my test suite with subscriptions work without any issues with v15 😉

@MichalLytek
Copy link
Owner Author

TypeGraphQL 1.0 has been finally released! 🎉
https://dev.to/michallytek/announcing-typegraphql-1-0-1d7h

You can read full changelog here:
https://github.com/MichalLytek/type-graphql/releases/tag/v1.0.0

Thank you guys for the amazing support! ❤️
Closing this one for a housekeeping purposes 🔒

@MichalLytek MichalLytek added the Solved ✔️ The issue has been solved label Aug 20, 2020
@MichalLytek MichalLytek moved this from In progress to Done in Board Aug 20, 2020
@MichalLytek MichalLytek removed the Help Wanted 🆘 Extra attention is needed label Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community 👨‍👧 Something initiated by a community Solved ✔️ The issue has been solved
Projects
Board
  
Done
Development

No branches or pull requests

10 participants