Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
graphql-codegen
Advanced tools
Changelog
apollo@2.16.0
, apollo-codegen-swift@0.34.0
, apollo-language-server@1.13.0
, apollo-tools@0.4.0
, vscode-apollo@1.8.0
apollo@2.16.0
service:list
and tests #1358 and header #1377service:list
test to use a simulated time to prevent relative dates causing snapshot failures #1374service:check
to support --markdown
and --json
flags for federated schema #1378service:check
to include graphCompositionId
in query params for UI #1401apollo-codegen-swift@0.34.0
apollo-language-server@1.13.0
apollo-tools@0.4.0
subscribe
in buildServiceDefinition
and add type in resolverMap
#1047vscode-apollo@1.8.0
<<-GRAPHQL...GRAPHQL
heredoc. #1304Readme
This is a tool to generate client code based on a GraphQL schema and query documents.
It currently only generates Swift code, and only for a subset of GraphQL queries. Most importantly, fragments are only supported if their type condition matches their parent type exactly. See Apollo iOS for details on the proposed mapping from GraphQL results to Swift types, as well as runtime support for performing queries.
Apollo iOS Quickstart is a sample Xcode project that makes it easy to get started with a generated API for your own schema and queries.
If you want to experiment with the tool, you can install the apollo-codegen
command globally:
npm install apollo-codegen -g
To download a GraphQL schema by sending an introspection query to a server:
apollo-codegen download-schema http://localhost:8080/graphql --output GitHuntAPI/Definitions/schema.json
You can use the header
option to add additional HTTP headers to the request. For example, to include an authentication token, use --header "Authorization: Bearer <token>"
.
To generate Swift code from a set of query definitions in .graphql
files:
apollo-codegen generate GitHuntAPI/Definitions/**/*.graphql --schema GitHuntAPI/Definitions/schema.json --output GitHuntAPI/GitHuntAPI.swift
FAQs
Generate client code based on a GraphQL schema and query documents
The npm package graphql-codegen receives a total of 12,651 weekly downloads. As such, graphql-codegen popularity was classified as popular.
We found that graphql-codegen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.