Skip to content

Fix error on anonymous query #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 14, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/GraphQL/Internal/Name.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ import Protolude
import qualified Data.Aeson as Aeson
import GHC.TypeLits (Symbol, KnownSymbol, symbolVal)
import Data.Char (isDigit)
import Data.Text as T (Text)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you do this? The Protolude import gets us exactly this Text.

import qualified Data.Attoparsec.Text as A
import Test.QuickCheck (Arbitrary(..), elements, listOf)
import Data.String (IsString(..))

import GraphQL.Internal.Arbitrary (arbitraryText)
import GraphQL.Internal.Syntax.Tokens (tok)

-- * Name

-- | A name in GraphQL.
--
-- https://facebook.github.io/graphql/#sec-Names
newtype Name = Name { unName :: Text } deriving (Eq, Ord, Show)
newtype Name = Name { unName :: T.Text } deriving (Eq, Ord, Show)

-- | Create a 'Name', panicking if the given text is invalid.
--
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Internal/Syntax/AST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module GraphQL.Internal.Syntax.AST

import Protolude

import Data.String (IsString(..))
--import Data.String (IsString(..))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just delete, rather than comment out.

import Test.QuickCheck (Arbitrary(..), elements, listOf, oneof)

import GraphQL.Internal.Arbitrary (arbitraryText)
Expand Down