File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
packages/services/api/src/modules/schema/providers Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1910,17 +1910,28 @@ export class SchemaPublisher {
1910
1910
1911
1911
this . logger . debug ( `Assigning ${ schemaLogIds . length } schemas to new version` ) ;
1912
1912
1913
+ const serviceName = input . service ;
1914
+ let serviceUrl = input . url ;
1915
+
1916
+ if (
1917
+ ( project . type === ProjectType . FEDERATION || project . type === ProjectType . STITCHING ) &&
1918
+ serviceUrl == null &&
1919
+ pushedSchema . kind === 'composite'
1920
+ ) {
1921
+ serviceUrl = pushedSchema . service_url ;
1922
+ }
1923
+
1913
1924
const schemaVersion = await this . schemaManager . createVersion ( {
1914
1925
valid : composable ,
1915
1926
organizationId : organizationId ,
1916
1927
projectId : project . id ,
1917
1928
targetId : target . id ,
1918
1929
commit : input . commit ,
1919
1930
logIds : schemaLogIds ,
1920
- service : input . service ,
1921
1931
schema : input . sdl ,
1922
1932
author : input . author ,
1923
- url : input . url ,
1933
+ service : serviceName ,
1934
+ url : serviceUrl ,
1924
1935
base_schema : baseSchema ,
1925
1936
metadata : input . metadata ?? null ,
1926
1937
projectType : project . type ,
You can’t perform that action at this time.
0 commit comments