browser-extensions
browser-extensions copied to clipboard
refactor: use non-deprecated GraphQL Repository.name (not uri)
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.repositoryuse thenamearg name and succeed.
I have tested on:
- [x] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Phabricator Bundle
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