code: func NewNodeDefinitions(config NodeDefinitionsConfig) *NodeDefinitions {
  	nodeInterface := graphql.NewInterface(graphql.InterfaceConfig{
  		Name:        "Node",
  		Description: "An object with an ID",
  		Fields: graphql.Fields{
  			"id": &graphql.Field{
  				Type:        graphql.NewNonNull(graphql.ID),
  				Description: "The id of the object",
  			},
  		},
  		ResolveType: config.TypeResolve,
  	})
  
  	nodeField := &graphql.Field{
  		Name:        "Node",
  		Description: "Fetches an object given its ID",
  		Type:        nodeInterface,
  		Args: graphql.FieldConfigArgument{
  			"id": &graphql.ArgumentConfig{
  				Type:        graphql.NewNonNull(graphql.ID),
  				Description: "The ID of an object",
  			},
  		},
  		Resolve: func(p graphql.ResolveParams) (interface{}, error) {
  			if config.IDFetcher == nil {
  				return nil, nil
  			}
  			id := ""
  			if iid, ok := p.Args["id"]; ok {
  				id = fmt.Sprintf("%v", iid)
  			}
  			return config.IDFetcher(id, p.Info, p.Context)
  		},
  	}
  	return &NodeDefinitions{
  		NodeInterface: nodeInterface,
  		NodeField:     nodeField,
  	}
  }
docs: /*
   Given a function to map from an ID to an underlying object, and a function
   to map from an underlying object to the concrete GraphQLObjectType it
   corresponds to, constructs a `Node` interface that objects can implement,
   and a field config for a `node` root field.
  
   If the typeResolver is omitted, object resolution on the interface will be
   handled with the `isTypeOf` method on object types, as with any GraphQL
  interface without a provided `resolveType` method.
  */