@@ -12,6 +12,7 @@ import { updateSubgraphNetwork } from '../command-helpers/network';
1212import  {  chooseNodeUrl ,  getHostedServiceSubgraphId  }  from  '../command-helpers/node' ; 
1313import  {  validateStudioNetwork  }  from  '../command-helpers/studio' ; 
1414import  {  assertGraphTsVersion ,  assertManifestApiVersion  }  from  '../command-helpers/version' ; 
15+ import  {  GRAPH_CLI_SHARED_HEADERS  }  from  '../constants' ; 
1516import  Protocol  from  '../protocols' ; 
1617
1718const  headersFlag  =  Flags . custom < Record < string ,  string > > ( { 
@@ -170,7 +171,10 @@ export default class DeployCommand extends Command {
170171      } 
171172
172173      // @ts -expect-error options property seems to exist 
173-       client . options . headers  =  {  Authorization : 'Bearer '  +  deployKey  } ; 
174+       client . options . headers  =  { 
175+         ...GRAPH_CLI_SHARED_HEADERS , 
176+         Authorization : 'Bearer '  +  deployKey , 
177+       } ; 
174178
175179      const  subgraphName  =  await  ux . prompt ( 'What is the name of the subgraph you want to deploy?' ,  { 
176180        required : true , 
@@ -299,7 +303,10 @@ export default class DeployCommand extends Command {
299303    deployKey  =  await  identifyDeployKey ( node ,  deployKey ) ; 
300304    if  ( deployKey  !==  undefined  &&  deployKey  !==  null )  { 
301305      // @ts -expect-error options property seems to exist 
302-       client . options . headers  =  {  Authorization : 'Bearer '  +  deployKey  } ; 
306+       client . options . headers  =  { 
307+         ...GRAPH_CLI_SHARED_HEADERS , 
308+         Authorization : 'Bearer '  +  deployKey , 
309+       } ; 
303310    } 
304311
305312    // Ask for label if not on hosted service 
@@ -384,7 +391,10 @@ export default class DeployCommand extends Command {
384391      // Connect to the IPFS node (if a node address was provided) 
385392      const  ipfsClient  =  create ( { 
386393        url : appendApiVersionForGraph ( ipfs . toString ( ) ) , 
387-         headers, 
394+         headers : { 
395+           ...headers , 
396+           ...GRAPH_CLI_SHARED_HEADERS , 
397+         } , 
388398      } ) ; 
389399
390400      // Fetch the manifest from IPFS 
0 commit comments