apollographql / apollographql/apollo-tooling

Intermediate Representation -> JSON without using old version

Open
#1,453 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

I'm planning on some [big changes to iOS codegen](https://github.com/apollographql/apollo-ios/issues/682) and I think from talking to @martijnwalraven, there's one major issue that can be solved on the Tooling end.

Right now, Android is generating code using the 1.x IR with [`target=json`](https://github.com/apollographql/apollo-android/blob/master/apollo-gradle-plugin/src/main/java/com/apollographql/apollo/gradle/CodegenGenerationTaskCommandArgsBuilder.java#L96) in order to generate code. From talking to Martijn and looking at the Gradle plugin, it seems like this is using an older version of the IR to generate the JSON that Android uses to generate the code.

Can we please get a `json` target which takes into account all the new work being done in v2.x of the Apollo CLI? It would be great because it'd allow flexibility for code generation in multiple languages.

Contributor guide

Open the contributing guide

Research direction

The issue points to apollo-gradle-plugin/src/main/java/com/apollographql/apollo/gradle/CodegenGenerationTaskCommandArgsBuilder.java and the Apollo CLI's target=json path; begin by comparing that output with the v2.x IR work referenced in the issue. Done means a json target emits the current v2.x IR without relying on the old 1.x format and remains usable for Android and other code generators.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.