Add a basic implementation of the applyCampaign mutation
Created by: mrnugget
This is another PR to be merged into https://github.com/sourcegraph/sourcegraph/pull/11675 and adds a basic implementation of the applyCampaign
mutation.
What the mutation already does:
- Find/create a campaign based on the given namespace and the name of the given
campaignSpec
. - Transfer fields from the given
campaignSpec
to thecampaign
— I'm not sure whether we want to keep that. I can see some pros in copying the data, but I don't think it's necessary, since to compute the "desired state" we'll need to have thecampaign
,campaignSpec
andchangesetSpecs
at hand anyway. - handle the
ensureCampaign
parameter
What I'm not sure about:
- Copying fields, mentioned above.
- why we need a
namespace: ID!
inapplyCampaign
, since thecampaignSpec
has anamespace
already.