- Update deps by @acro5piano
- Remove typescript as a peer dependency by @kevinsimper in #344
- Update deps by @acro5piano
- Fix index.test.ts link in README.md by @vkrol in #267
- Export all files by @acro5piano
- Replace husky with simple-git-hooks by @acro5piano in #334
- @vkrol made their first contribution in #267
Full Changelog: https://github.com/acro5piano/typed-graphqlify/compare/v3.1.4...v3.1.5
- Update deps by @acro5piano
- Update deps by @acro5piano
- Keep comments in compiled code by @acro5piano
- Parameter Arrays #209 by @alewgbl
- Bump deps by @acro5piano
- Add QueryObject and CompiledResult to index.ts by @GSA05
- Bump deps by @acro5piano
- Fix null in params by @acro5piano
- Bump deps by @acro5piano
⚠ Breaking: query
, mutation
, subscription
now returns CompiledResult
(not returns GraphQL string).
interface CompiledResult<D, V> {
toString: () => string
data: D
variable: V
result: { data: D }
}
Migration Guide
2.x
const queryObject = {
user: {
id: types.number,
name: types.string,
bankAccount: {
id: types.number,
branch: types.string,
},
},
}
const queryString = query('GetUser', queryObject)
type Result = typeof queryObject
3.x
const q = query('GetUser', {
user: {
id: types.number,
name: types.string,
bankAccount: {
id: types.number,
branch: types.string,
},
},
})
const queryString = q.toString()
type Result = typeof q.data
- Bump deps by @acro5piano
- Bump deps by @acro5piano
- Allow render a single fragment by @kevinsimper
- Array enum support by @acro5piano
- Make enum to accept both
ValueOf<T>
andkeyof T
by @acro5piano
- Fix vulnerability, and typing by @acro5piano
- Use
ValueOf<T>
instead ofkeyof T
in types.enum by @acro5piano
- Fix rollup config: exluding 'tslib' by @acro5piano
- union fragment support by @luvies
- Fix function export by @acro5piano
Features
- Fragment support by @luvies
Breaking changes
query
,mutation
,subscription
are now top-level export by @acro5piano- Replace
__params
withparams
helper by @luvies
For more detail, please see #54
- Add rawString helper function by @Zzzen
- Refactor rendering GraphQL
- Fix #41
All by @luvies
- fix Using a scalar in an array outputs incorrect GraphQL @acro5piano and @luvies
- Bugfix: Nested fragment objects by @luvies
- Add npmignore files by @acro5piano
- Add custom scalar property by @luvies and @acro5piano
- Support inline fragment by @acro5piano
- Support for nested params added by @mlegenhausen
- Add type inference to query alias by @acro5piano
- add alias feature by @YardWill
- Delete type helper and fix readme by @acro5piano
- Split the code and Overload the query function by @YardWill
- Adds a proper ES6 entry point by Jiri Spac @capaj
- Removed superfluous TS strict options by @arjunyel
- Instead of passing the type of the graphql operation as first parameter typed-graphqlify now has methods on the
graphqlify
exported object by Jiri Spac @capaj
- First stable release by Kazuya Gosho @acro5piano