1.0.0-beta.1
Pre-release
Pre-release
Highlights
- Integrate code generation through the
GraphQLCodegenSwift API, the new JSON-configuredgraphql-codegenexecutable, or the newGraphQLCodegenPluginSwiftPM build-tool plugin. - Configure registered and automatic persisted operations, hash the final generated document at request time, control unregistered-operation fallback, and generate registered-operation manifests separately from Swift output.
- Generate schema declarations in
Schema.swiftand shared GraphQL infrastructure inSupport.swift, configure custom scalar mappings, preserve unrelated files, and avoid rewriting unchanged generated files. - Support
@skipand@includeon typed named fragments, including nested selections, merged conditions, operation defaults, and response decoding with operation context. - Improve GraphQL HTTP compatibility with configurable JSON request encoders, correctly escaped GET query parameters, structured persisted-query errors, legacy JSON response fallback, and response
Content-Typevalidation. - Accept
.graphqlSDL files, wrapped introspection JSON responses, and JSON fallback for remote introspection. - Include a complete Star Wars GraphQL Worker server and iOS clients demonstrating the Swift API, standalone CLI, and SwiftPM plugin.
Compatibility and migration
- The generator requires Swift 6.3 and macOS 26 or newer. Generated subscription support requires version 26 or newer of the target Apple platform.
- Schemas and introspection endpoints must conform to the September 2025 GraphQL specification; introspection endpoints must expose
__Type.isOneOf. - Replace the former generated API output configuration with
output.support. Shared infrastructure now lives inSupport.swift, and generated schema types now live inSchema.swift. - GraphQL documents are always validated. Generate registered-operation manifests explicitly with
Codegen.generatePersistedOperationManifestFile(at:).
Install
.package(
url: "https://github.com/pm-dev/swift-graphql-codegen",
exact: "1.0.0-beta.1"
)What's Changed
- Configure generated GraphQL document minification by @pm-dev in #106
- Update pnpm to v11 by @renovate[bot] in #84
- Reorganize test structure by @pm-dev in #107
- Remove unused test plan by @pm-dev in #108
- Accept .graphql SDL schema files by @pm-dev in #109
- Add Star Wars GraphQL Worker server by @pm-dev in #110
- Update dependency typescript to v7 by @renovate[bot] in #111
- Add Star Wars iOS example client by @pm-dev in #112
- Handle GraphQL HTTP error responses correctly by @meyers-oai in #114
- Rename generated API infrastructure to Support by @pm-dev in #117
- Hash registered persisted operations at request time by @pm-dev in #118
- Always validate GraphQL documents during code generation by @meyers-oai in #119
- Add configurable GraphQL scalar mappings by @meyers-oai in #120
- Generate GraphQL schema types in a single Swift file by @pm-dev in #121
- Generate GraphQL support types in a single Swift file by @pm-dev in #122
- Regenerate Worker types before checking the Star Wars server by @meyers-oai in #123
- Update dependency wrangler to v4.120.1 by @renovate[bot] in #115
- Preserve unrelated files in GraphQL document output directories by @pm-dev in #125
- Update dependency wrangler to v4.122.0 by @renovate[bot] in #124
- Separate registered operation manifests from Swift generation by @pm-dev in #127
- Move each GraphQL configuration type into its own file by @pm-dev in #128
- Reject duplicate GraphQL document filenames in shared output directories by @pm-dev in #129
- Add standalone JSON-configured graphql-codegen executable by @pm-dev in #130
- Add SwiftPM build-tool plugin support by @pm-dev in #113
- Support configurable JSON request encoders by @pm-dev in #132
- Recognize structured persisted-query errors by @pm-dev in #134
- Accept legacy GraphQL JSON responses by default by @pm-dev in #133
- Validate GraphQL response Content-Type headers by @pm-dev in #138
- Add SwiftFormat setup, pre-commit hook, and CI check by @pm-dev in #131
- Encode GraphQL GET parameters using form rules by @pm-dev in #139
- Simplify GraphQL code generator implementation by @pm-dev in #141
- Validate HTTP operation conformances by @pm-dev in #142
- Allow GraphQL fragments named typename by @pm-dev in #144
- Accept JSON fallback for remote introspection by @pm-dev in #143
- Accept wrapped GraphQL introspection JSON files by @pm-dev in #145
- Avoid rewriting unchanged generated files by @pm-dev in #146
- Simplify input object recursion handling by @pm-dev in #148
- Update Swift API example for registered operations by @pm-dev in #149
- Escape scalar specifiedBy documentation URLs by @pm-dev in #150
- Pass operations to GraphQL response decoders by @pm-dev in #151
- Update dependency wrangler to v4.123.0 by @renovate[bot] in #147
- Enable automatic merging for non-major Renovate updates by @pm-dev in #153
- Update dependency @graphql-yoga/plugin-apq to v3.21.3 by @renovate[bot] in #135
- Update dependency pre-commit to v4.6.2 by @renovate[bot] in #140
- Update dependency @graphql-yoga/plugin-persisted-operations to v3.21.3 by @renovate[bot] in #136
- Support @Skip and @include on named fragment spreads by @pm-dev in #152
New Contributors
- @meyers-oai made their first contribution in #114
Full Changelog: 1.0.0-alpha.1...1.0.0-beta.1