Segment types

This list contains all query and input types for the segment endpoints.


Segment

Fields

  • Name
    id
    Type
    ID!
    Description

    Unique identifier for the segment.

  • Name
    _id
    Type
    Int!
    Description

    Unique numeral identifier for the segment.

  • Name
    settings
    Type
    SegmentConfig!
    Description

    The segment settings.

    type SegmentConfig {
    	exclude: SegmentCondition!
    	include: SegmentCondition!
    }
    
    type SegmentCondition {
    	operator: SegmentConfigConditionType!
    	tags: [String!]!
    }
    
    enum SegmentConfigConditionType {
    	AND
    	OR
    }
    
  • Name
    name
    Type
    String!
    Description

    The segment name.

  • Name
    description
    Type
    String!
    Description

    The segment description.

  • Name
    statistics
    Type
    Int!
    Description

    The segment statistics.

  • Name
    updated_at
    Type
    TimeStamp!
    Description

    Timestamp of when the segment was updated.

    Arguments

  • Name
    format
    Type
    String
    Description

    The supported format parameters: fromNow YYYY-MM-DD HH:mm:ss

  • Name
    suffix
    Type
    Boolean
    Description

    TimeStamp suffix

  • Fields

    scalar TimeStamp

  • Name
    created_at
    Type
    TimeStamp!
    Description

    Timestamp of when the segment was created.

Request

POST
https://api.lightfunnels.com/graphql
query SegmentsQuery($first: Int, $after: String, $query: String!){
	segments(query: "order_by:id order_dir:desc", after: "WzVE4OTA5LDEe/4OTA5XQ==", first: 10){
		edges{
			node{
				id
				name
				description
				...
			}
		}
	}
}

SegmentInput

Fields

  • Name
    name
    Type
    String
    Description

    The segment name.

  • Name
    description
    Type
    String
    Description

    The segment description.

  • Name
    settings
    Type
    InputSegmentConfig
    Description

    The segment settings.

    input InputSegmentConfig {
    	exclude: InputSegmentCondition
    	include: InputSegmentCondition
    }
    
    input InputSegmentCondition {
    	operator: SegmentConfigConditionType
    	tags: [String!]!
    }
    
    enum SegmentConfigConditionType {
    	AND
    	OR
    }
    

Request

POST
https://api.lightfunnels.com/graphql
mutation mutationName($node: SegmentInput!) {
	createSegment(node: $node){
		# Segment type fields
	}
}

SegmentConnection

Fields

  • Name
    pageInfo
    Type
    PageInfo!
    Description

    Segment connection page info.

    type PageInfo {
    	hasNextPage: Boolean!
    	hasPreviousPage: Boolean!
    	startCursor: String
    	endCursor: String
    }
    
  • Name
    edges
    Type
    [SegmentEdge]
    Description

    The Segment connection edges.

    type SegmentEdge {
    	node: Segment
    	cursor: String!
    }