Skip to content

v3.1.0

Compare
Choose a tag to compare
@Quramy Quramy released this 15 Mar 15:43
· 348 commits to main since this release

New Features

🎉 ts-graphql-plugin gets compat graphql-codegen 🎉

  • The new enabledGlobalFragments option allows to analyze operation and fragments defined in different templates without interpolation(e.g. ${postFragment}).
  • Function call expression is available as GraphQL document via tag option .

In combination these, ts-graplql-plugin works with graphql-codegen compatible code such as:

import { graphql } from "./gql";

const postFragment = graphql(`
  fragment PostFragment on Post {
    title
    author {
      name
    }
  }
`);

const query = graphql(`
  query AppQuery {
    popularPosts {
      id
      ...PostFragment
    }
  }
`);

See example If you want more details,

What's Changed

Full Changelog: v3.0.2...v3.1.0