Giter Site home page Giter Site logo

Comments (11)

yaacovCR avatar yaacovCR commented on June 30, 2024

Yes! Congrats!

Hopefully over the next few days will update branch.

from graphql-tools-fork.

IvanGoncharov avatar IvanGoncharov commented on June 30, 2024

@yaacovCR Sounds great 👍 I already promised that it will be the last batch of breaking changes so if everything goes smooth next release would be 15.0.0.

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

released as [email protected] a bit prematurely, some failing tests, but two are related to the order the schema is printed i believe not matching test expectation, known breaking change/improvement.

Last one I am not so sure.

There were additional linting changes.

Also graphql-tools upstream will need to be updated to refer to printSchema.js instead of SchemaPrinter when it reaches into internal export

But looks ok!!

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

You can install support for v15 rc2 with:

npm install [email protected]

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

bb02f68

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

@IvanGoncharov , FYI I also had to remove node 8 support only this go around. I see no longer supported in graphql-js, but was working anyway in rc1.

In rc2, all subscription stuff failed with v8. Having said that, I am not sure that rc2 itself required removing v8 support, as I also did a fresh install and possibly another dependency received a minor update that broke it

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

@IvanGoncharov

More careful review of above shows that change in
graphql/graphql-js@23b427c#diff-824b72afd8ba7cd9703ec9cf944ab81a

causes TypeScript to be unable to parse the return type of getNullableType when passing in a parameter of type GraphQLType.

This can be fixed, I think, by changing the definition of:

export type GraphQLType =
  | GraphQLScalarType
  | GraphQLObjectType
  | GraphQLInterfaceType
  | GraphQLUnionType
  | GraphQLEnumType
  | GraphQLInputObjectType
// from:
//  | GraphQLList<any>
//  | GraphQLNonNull<any>;
// to:
  | GraphQLList<GraphQLType>
  | GraphQLNonNull<GraphQLType>;

Parallel changes can be made elsewhere, for example:

export type GraphQLNullableType =
  | GraphQLScalarType
  | GraphQLObjectType
  | GraphQLInterfaceType
  | GraphQLUnionType
  | GraphQLEnumType
  | GraphQLInputObjectType
//  from:
//  | GraphQLList<any>;
//  to:
  | GraphQLList<GraphQLType>;

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

I am also able to make this change on my version of TypeScript:

export type GraphQLOutputType =
  | GraphQLScalarType
  | GraphQLObjectType
  | GraphQLInterfaceType
  | GraphQLUnionType
  | GraphQLEnumType
// ADD:
//  | GraphQLList<GraphQLOutputType>
//  | GraphQLNonNull<GraphQLOutputType>;
// REMOVE:
//  | GraphQLList<any>
//  | GraphQLNonNull<
//      | GraphQLScalarType
//      | GraphQLObjectType
//      | GraphQLInterfaceType
//      | GraphQLUnionType
//      | GraphQLEnumType
//      | GraphQLList<any>
//    >;

Comment above that portion of code notwithstanding, looking like TypeScript is allowing recursive type definitions...

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

Released support in v8.6.0.

from graphql-tools-fork.

IvanGoncharov avatar IvanGoncharov commented on June 30, 2024

@yaacovCR Thanks for the investigation 👍
Sadly changes that you proposed breaks pre-3.7 TS versions:
image
So simplest solution would be to partially revert graphql/graphql-js@23b427c#diff-824b72afd8ba7cd9703ec9cf944ab81a

Long term plan: After TS rewrite we can increase minimal supported version to 3.4 and use https://github.com/sandersn/downlevel-dts

from graphql-tools-fork.

yaacovCR avatar yaacovCR commented on June 30, 2024

Gotcha.

from graphql-tools-fork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.