added author on gql puissance d'agir
This commit is contained in:
		@@ -67,6 +67,7 @@ type Etape {
 | 
			
		||||
type Besoin implements NodeInterface {
 | 
			
		||||
  id: Int!
 | 
			
		||||
  path: String!
 | 
			
		||||
  author: String
 | 
			
		||||
  description: String!
 | 
			
		||||
  index: Int
 | 
			
		||||
  concernement: Concernement
 | 
			
		||||
@@ -76,6 +77,7 @@ type Besoin implements NodeInterface {
 | 
			
		||||
type Reponse implements NodeInterface {
 | 
			
		||||
  id: Int!
 | 
			
		||||
  path: String!
 | 
			
		||||
  author: String
 | 
			
		||||
  besoin: Besoin
 | 
			
		||||
  qui: String
 | 
			
		||||
  quoi: String
 | 
			
		||||
 
 | 
			
		||||
@@ -585,6 +585,14 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
 | 
			
		||||
      )
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    $registry->addFieldResolver('Besoin', 'author',
 | 
			
		||||
      $builder->compose(
 | 
			
		||||
        $builder->produce('entity_owner')
 | 
			
		||||
          ->map('entity', $builder->fromParent()),
 | 
			
		||||
        $builder->produce('entity_label')
 | 
			
		||||
          ->map('entity', $builder->fromParent())
 | 
			
		||||
      ));
 | 
			
		||||
 | 
			
		||||
    // description: String!        
 | 
			
		||||
    $registry->addFieldResolver('Besoin', 'description',
 | 
			
		||||
      $builder->produce('property_path')
 | 
			
		||||
@@ -680,6 +688,15 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
 | 
			
		||||
          ->map('url', $builder->fromParent())
 | 
			
		||||
      )
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    $registry->addFieldResolver('Reponse', 'author',
 | 
			
		||||
      $builder->compose(
 | 
			
		||||
        $builder->produce('entity_owner')
 | 
			
		||||
          ->map('entity', $builder->fromParent()),
 | 
			
		||||
        $builder->produce('entity_label')
 | 
			
		||||
          ->map('entity', $builder->fromParent())
 | 
			
		||||
      ));
 | 
			
		||||
 | 
			
		||||
    // besoin: Besoin
 | 
			
		||||
    $registry->addFieldResolver('Reponse', 'besoin',
 | 
			
		||||
      $builder->compose(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user