Skip to content
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

client.schema is a Graphlient::Schema #44

Open
mxdavis opened this issue May 9, 2018 · 7 comments
Open

client.schema is a Graphlient::Schema #44

mxdavis opened this issue May 9, 2018 · 7 comments
Labels

Comments

@mxdavis
Copy link

mxdavis commented May 9, 2018

Hi,

Not sure if this is the right place for this. This is my second time using graphlient, and the first I did not have this problem.

Right now my expect(client.schema).to be_a GraphQL::Schema doesn't pass, but expect(client.schema).to be_a Graphlient::Schema does.

This is my client:

let(:client) do
    Graphlient::Client.new('https://www.example.org/graphql') do |client|
      client.http do |h|
        h.connection do |c|
          c.use Faraday::Adapter::Rack, app
        end
      end
    end
  end

Thanks very much.

@dblock
Copy link
Collaborator

dblock commented May 10, 2018

This changed in 3.0.1, eff5e92. Where/how is this an issue for you?

@dblock
Copy link
Collaborator

dblock commented May 10, 2018

Oh I think this is documented wrong, care to update the README? The Graphlient::Schema class delegates everything to a GraphQL::Schema I believe so they effectively act the same, but one does't inherit from the other.

@dblock
Copy link
Collaborator

dblock commented May 10, 2018

cc: @povilasjurcys

@yuki24
Copy link
Collaborator

yuki24 commented May 10, 2018

@mxdavis As a general testing advice, I would suggest testing interfaces (duck typing) rather than checking the class.

@mxdavis
Copy link
Author

mxdavis commented May 17, 2018

Ok cool, the other testing was working so I'll go with that. Thanks so much for your speedy responses

@dblock
Copy link
Collaborator

dblock commented May 17, 2018

See #45 that fixes the related test. Not sure how this slipped in.

@dblock
Copy link
Collaborator

dblock commented May 17, 2018

Closing via #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants