Fix naming/lookup of core schema directives in supergraph
Issue Description
When implementing @authenticated and @requireScopes, @trevor-scheer noticed that there was an issue if they were both in the same coreSpec auth. There seems to be two main issues.
-
The name it looks for in
mergeAppliedDirectiveis inconsistent with how it's named in the supergraph. Thenamefield when trying to merge is@authenticated, but in the supergraph it gets named as either@auth_authenticatedor@authenticated__authenticateddepending on thenameparameter on theFeatureUrl. Counterintuitively the prefix seems to be the opposite of the name on theFeatureUrl, so there is something broken with how things are named in addition to the lookup being inconsistent. -
If we try to rename directives via using
as, The name is seemingly more incorrect in the supergraph. If we import@authenticatedas@myauth, then the name we get in the supergraph is@myauth__authenticated, when I think it should be@auth__myauth.
Link to Reproduction
n/a
Reproduction Steps
No response