Skip to content

Deprecate apollo CLI service:* commands#2308

Merged
hwillson merged 6 commits intomasterfrom
rover-warnings
May 11, 2021
Merged

Deprecate apollo CLI service:* commands#2308
hwillson merged 6 commits intomasterfrom
rover-warnings

Conversation

@hwillson
Copy link
Copy Markdown
Member

@hwillson hwillson commented May 6, 2021

This PR deprecates the apollo CLI service:* commands by:

  • Printing (to stderr) deprecation messages for all runtime apollo service:* commands (pointing people to the Rover migration guide)
  • Printing deprecation messages when using apollo service:* CLI help commands
  • Labelling all service:* commands as deprecated in the README

service:* functionality has not been removed since this PR will be rolled out in a patch release. After Rover is officially released, we’ll push out a new major version of apollo that fully removes the service:* commands.

Reference: apollographql/rover#471

Copy link
Copy Markdown
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I'm not sure what to do about the README.md. 🤔

It's plausible to believe we could augment that oclif readme command with some apollo service: searchin' and replacing?

Comment thread packages/apollo/README.md Outdated
Comment thread packages/apollo/test-utils/setup.js
hwillson added 6 commits May 7, 2021 20:05
Notify users of the `service:*` commands that they have been
deprecated, and point people towards Rover for replacement
functionality.
Mostly to avoid the new service:* deprecation warnings, but also
as an added bit of cleanup for previous console.log's that
don't need to show.
It would have been great to add the full deprecation message
to the top of the service:* command help output, but oclif
will only allow one line to be shown in the description section
of the help. As soon as it encounters a newline, it moves all
subsequent content down into a DESCRIPTION section. To help with
this, this commit prefixes each service:* description with
[DEPRECATED] to make sure the deprecation notice is one of the
first things people see. Then the full deprecation message is
shown in the DESCRIPTION section.
@hwillson hwillson merged commit 810e247 into master May 11, 2021
@hwillson hwillson deleted the rover-warnings branch May 11, 2021 00:40
@mindaugasnakrosis
Copy link
Copy Markdown

@hwillson if I previously used apollo service:codegen, and Rover does not have it. What do I do? Is this functionality being removed in the next major release without any replacement in the Rover?

@abernix
Copy link
Copy Markdown
Member

abernix commented Jun 8, 2021

@mindaugasnakrosis apollo service:codegen is not a command I'm familiar with. Are you perhaps referring to apollo client:codegen?

The client:* commands are not being deprecated.

@mindaugasnakrosis
Copy link
Copy Markdown

mindaugasnakrosis commented Jun 8, 2021

@abernix I actually wrote a wrong command, my bad, however, the same question
npx apollo service:download --endpoint=$(grep REACT_APP_GRAPHQL_URL .env | cut -d '=' -f2) graphql-schema.json

Downloads a schema from a graphql endpoint which I use to generate typescript typings

I get an error:

DEPRECATED: This command will be removed from the apollo CLI in
its next major version. Replacement functionality is available in
the new Apollo Rover CLI: https://go.apollo.dev/t/migration

I tried rover with graph download, however it downloads it in a different shape and format which I can not use to generate typescript typings, however maybe I have missed something?

I followed this tutorial: https://www.apollographql.com/blog/tooling/apollo-codegen/typescript-graphql-code-generator-generate-graphql-types/

@abernix
Copy link
Copy Markdown
Member

abernix commented Jul 26, 2021

@mindaugasnakrosis I believe that apollo service:download would download the introspection result in JSON format. I believe rover graph introspect <endpoint> would get you the same result. Could you try that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants