apollographql / apollographql/apollo-tooling

Command to execute query from Apollo CLI

Open
#1,700 1 comment 0 reactions 0 assignees View on GitHub
:hammer: cli :tada: feature
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

It'd be helpful to have a command in the CLI to execute operations against a graphql server. The output could be piped to other tools

For example:
```
apollo execute "query(id: ID!) { node(id: $ID) { ... on User { username } } }" --variables=\{ "id": 1 \} --headers=authorization:"bearer 12345" | jq 'data.node.username' | cat
```

The logic and maintenance of this command would be pretty minimal if my thinking is correct.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Apollo CLI command structure and how existing commands handle arguments and output. Define the command's handling of GraphQL operations, variables, headers, and piped output, then verify it against the example and confirm the result can be consumed by tools such as jq.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.