@@ -11,12 +11,12 @@ import { transformSchema } from 'apollo-server-express';
1111function getConnectionTypes ( prefix ) {
1212 return `
1313 extend type ${ prefix } Event {
14- region: CmsRegion
15- cmsEventRestrictions: [CmsEventRestriction!]!
14+ region(locale: String) : CmsRegion
15+ cmsEventRestrictions(locale: String) : [CmsEventRestriction!]!
1616 }
1717
1818 extend type ${ prefix } EventGroup {
19- cmsEventGroup: CmsEvent
19+ cmsEventGroup(locale: String) : CmsEvent
2020 }
2121
2222 extend type ${ prefix } PublicPerson {
@@ -28,7 +28,6 @@ function getConnectionTypes(prefix) {
2828function getConnectionResolvers ( prefix , schemas ) {
2929 return {
3030 [ `${ prefix } Event` ] : {
31-
3231 region : {
3332 selectionSet : "{ contentfulWebname }" ,
3433 async resolve ( parent , args , context , info ) {
@@ -44,6 +43,7 @@ function getConnectionResolvers(prefix, schemas) {
4443 webname : parent . contentfulWebname ,
4544 } ,
4645 limit : 1 ,
46+ ...args
4747 } ,
4848 transforms : [
4949 new AddFieldToRequestTransform ( schemas . cms , "Region" , "webname" ) ,
@@ -78,6 +78,7 @@ function getConnectionResolvers(prefix, schemas) {
7878 id_in : parent . contentfulEventRestrictions ,
7979 } ,
8080 limit : 1 ,
81+ ...args ,
8182 } ,
8283 transforms : [
8384 new TransformQuery ( {
@@ -118,6 +119,7 @@ function getConnectionResolvers(prefix, schemas) {
118119 id : parent . contentfulId ,
119120 } ,
120121 limit : 1 ,
122+ ...args
121123 } ,
122124 transforms : [
123125 new TransformQuery ( {
0 commit comments