Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

refactor: use non-deprecated GraphQL Repository.name (not uri) #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sqs
Copy link
Member

@sqs sqs commented Nov 4, 2018

The Repository.uri field in GraphQL (and in general) is deprecated in favor of Repository.name. This is just a different name for the same value (name is a better name than uri because the value is not actually a URI, so uri is a misnomer). The value that both fields contain is the string of the form github.com/foo/bar for a repository.

The GraphQL Query.repository resolver also has 2 equivalent args, name and uri, and this also changes calls to use the former (for the same reason).

There is no change in behavior.

Testing plan:

  • Load a GitHub page and ensure the GraphQL queries calling Query.repository use the name arg name and succeed.

I have tested on:

  • Chrome
  • Firefox
  • Safari
  • Phabricator Bundle

The Repository.uri field in GraphQL (and in general) is deprecated in favor of Repository.name. This is just a different name for the same value (`name` is a better name than `uri` because the value is not actually a URI, so `uri` is a misnomer). The value that both fields contain is the string of the form `github.com/foo/bar` for a repository.

The GraphQL `Query.repository` resolver also has 2 equivalent args, `name` and `uri`, and this also changes calls to use the former (for the same reason).
@sqs sqs requested a review from ijsnow as a code owner November 4, 2018 06:56
@chrismwendt
Copy link

Here's how to move this PR to https://github.com/sourcegraph/sourcegraph/tree/master/packages/browser-extensions

cd browser-extensions
git format-patch master --stdout > /tmp/patch

cd ../sourcegraph
cat /tmp/patch | git am -3 --directory=packages/browser-extensions/
# and fixup merge conflicts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants