File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -279,19 +279,18 @@ import { graphql } from "@hypermode/modus-sdk-as"
279279//  the name of the GraphQL connection, as specified in the modus.json manifest
280280const :  string  =  " my-graphql-api" 
281281
282- //  Declare  classes used to parse the JSON document returned
283- @json 
284- class  GetPersonResponse  {
285-   getPerson:  Person 
286- }
287- 
282+ //  Declare classes used to parse the JSON document returned
288283@json 
289284class  Person  {
290285  name:  string  =  " " 
291286  age:  i32  =  0 
292287}
288+ @json 
289+ class  GetPersonResponse  {
290+   getPerson:  Person  |  null 
291+ }
293292
294- export  function  getPerson(name :  string ):  Person  {
293+ export  function  getPerson(name :  string ):  Person  |   null   {
295294  const =  ` 
296295    query getPerson($name: String!) { 
297296      getPerson(name: $name) { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments