browser-extensions icon indicating copy to clipboard operation
browser-extensions copied to clipboard

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

Open sqs opened this issue 7 years ago • 1 comments

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:

  • [x] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Phabricator Bundle

sqs avatar Nov 04 '18 06:11 sqs

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

chrismwendt avatar Nov 05 '18 03:11 chrismwendt