Skip to content

Commit

Permalink
Filter out ppxAllowStringReturnType
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrolich committed May 17, 2024
1 parent 3aebf83 commit 79d140a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var Raw$1 = {};

var query$1 = Gql`query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function back to the original JSON compatible data ")
[
"query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function back to the original JSON compatible data ")
[
"query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var Raw$1 = {};

var query$1 = Gql`query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function back to the original JSON compatible data ")
[
"query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var Raw$1 = {};

var query$1 = Gql`query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function back to the original JSON compatible data ")
[
"query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var Raw$1 = {};

var query$1 = Gql`query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function back to the original JSON compatible data ")
[
"query MyQuery {
lists {
...ListFragment @ppxAllowStringReturnType
...ListFragment
}

}
Expand Down
15 changes: 7 additions & 8 deletions src/graphql_compiler/graphql_printer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ let print_directive d =
| None -> ""

let is_internal_directive d =
match d.item.d_name.item with
| "bsOmitFutureValue" | "ppxOmitFutureValue" | "bsVariant" | "ppxVariant"
| "bsRecord" | "ppxRecord" | "bsObject" | "ppxObject" | "bsDecoder"
| "ppxDecoder" | "bsCustom" | "ppxCustom" | "ppxCustomOpt" | "bsAs" | "ppxAs"
| "argumentDefinitions" | "arguments" | "bsField" | "ppxField" | "ppxConfig"
->
true
| _ -> false
let name = d.item.d_name.item in
if
String.starts_with ~prefix:"bs" name
|| String.starts_with ~prefix:"ppx" name
then true
else
match name with "argumentDefinitions" | "arguments" -> true | _ -> false

let print_directives ds =
" "
Expand Down

0 comments on commit 79d140a

Please sign in to comment.