Skip to content

sahandevs/graphql_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status

Build GraphQL queries in dart.

Example

this code:

Document()
    .add(Query(name: "test")
        .addSelection(Field("title"))
        .addSelection(Field("name"))
        .addSelection(FragmentSpread("frag1")))
    .add(Fragment("frag1", TypeCondition("Cat"))
        .addSelection(Field("id"))
        .addSelection(Field("name")))
    .bake()

will generate this query:

query test {
  title
  name
  ...frag1
} 

fragment frag1 on Cat {
  id
  name
}

Usage

add graphql_builder: ^1.0.0 to your dependencies

About

Build GraphQL queries in dart.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors